search for: perl_expr

Displaying 9 results from an estimated 9 matches for "perl_expr".

2014 Aug 28
14
[PATCH 00/13] code refactorings for tools
Hi, this series does a couple of code reorganizations/refactoring in code used by tools: the windows path handling code, and the two types of file editing (using editor, and using perl expression). There's still a code duplication between the two variants of file editing, but it is just within a single source, and can be easily solved now (planning as next step). Pino Toscano (13): edit:
2014 Jun 23
2
[PATCH] edit: add -m option
...edit/virt-edit.pod | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 5 deletions(-) diff --git a/edit/edit.c b/edit/edit.c index 07790be..7a2603c 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -53,6 +53,7 @@ static const char *backup_extension = NULL; static const char *perl_expr = NULL; static void edit_files (int argc, char *argv[]); +static void edit_files_simple (int argc, char *argv[]); static void edit (const char *filename, const char *root); static char *edit_interactively (const char *tmpfile); static char *edit_non_interactively (const char *tmpfile); @@ -84...
2012 Feb 08
2
Fix virt-edit so it preserves permissions (RHBZ#788641)
The first patch preserves file mode, UID, GID and SELinux context across edited files. The second patch adds a useful new command in guestfish ('llz') which shows SELinux context (like 'ls -laZ') that was useful when debugging this. Rich.
2014 Jun 23
2
Re: [PATCH] edit: add -m option
On Mon, Jun 23, 2014 at 12:30:07PM +0100, Richard W.M. Jones wrote: > > Same comment about do_edit_simple as I previously posted about > do_cat_simple. I mean edit_files_simple ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...- exit (EXIT_FAILURE); - } + if (backup_extension) + error (EXIT_FAILURE, 0, _("-b option given multiple times")); backup_extension = optarg; break; @@ -184,11 +177,8 @@ main (int argc, char *argv[]) break; case 'e': - if (perl_expr) { - fprintf (stderr, _("%s: -e option given multiple times\n"), - guestfs_int_program_name); - exit (EXIT_FAILURE); - } + if (perl_expr) + error (EXIT_FAILURE, 0, _("-e option given multiple times")); perl_expr = optarg;...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only code motion (or supposed to be). A new directory, common/, is created for all of the common code which is currently shared in random ways between parts of the project. And src/ becomes lib/ (the largest change, but mostly mechanical). In full this series makes the following changes: src/libprotocol -> common/protocol
2017 Jan 25
10
[PATCH v2 0/7] Rename src/ to lib/ and move common code to common/
Previous patch series was posted here: https://www.redhat.com/archives/libguestfs/2017-January/msg00059.html v2 simply extends this patch series to cover the extra directories common/edit, common/progress, common/windows and common/parallel. The only remaining item is to consider whether we should rename mllib to something else, mlcommon was my suggestion. Rich.