search for: str_cp

Displaying 18 results from an estimated 18 matches for "str_cp".

Did you mean: str_c
2014 Jan 19
1
[PATCH] daemon: add missing GUESTFSD_EXT_CMD usage
...reply_with_error ("%s: %s", "btrfs device add --help", err); return -1; diff --git a/daemon/command.c b/daemon/command.c index 02e1dd4..066c773 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -30,6 +30,7 @@ #include "ignore-value.h" +GUESTFSD_EXT_CMD(str_cp, cp); GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); @@ -179,7 +180,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's <sysroot>/etc/resolv.conf is out the way, we * can create our own copy of the appliance /etc/resolv.con...
2013 Jan 02
3
[PATCH] daemon: copy entire lvm directory
...4]; + char cmd[64], env[64]; int r; /* If /etc/lvm directory doesn't exist (or isn't a directory) assume @@ -68,8 +68,8 @@ copy_lvm (void) exit (EXIT_FAILURE); } - /* Hopefully no dotfiles in there ... XXX */ - snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir); + /* Copy the entire directory */ + snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir); r = system (cmd); if (r == -1) { perror (cmd); @@ -85,7 +85,8 @@ copy_lvm (void) } /* Set environment variable so we use the copy. */ - set...
2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...lude <stdbool.h> -#include <string.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> - -#include "guestfs_protocol.h" -#include "daemon.h" -#include "actions.h" - -#include "ignore-value.h" - -GUESTFSD_EXT_CMD(str_cp, cp); -GUESTFSD_EXT_CMD(str_mount, mount); -GUESTFSD_EXT_CMD(str_umount, umount); - -#ifdef HAVE_ATTRIBUTE_CLEANUP -#define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) -#define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) -#else -#define CLEANUP_BIND_STATE -...
2016 Jul 26
0
[PATCH 2/5] daemon: lvm-filter: start lvmetad better
...s --run # Scan for LVM. modprobe dm_mod ||: -lvmetad ||: lvm vgchange -aay --sysinit diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c index 8629aab..2add95a 100644 --- a/daemon/lvm-filter.c +++ b/daemon/lvm-filter.c @@ -39,6 +39,7 @@ GUESTFSD_EXT_CMD(str_lvm, lvm); GUESTFSD_EXT_CMD(str_cp, cp); GUESTFSD_EXT_CMD(str_rm, rm); +GUESTFSD_EXT_CMD(str_lvmetad, lvmetad); /* This runs during daemon start up and creates a complete copy of * /etc/lvm so that we can modify it as we desire. We set @@ -97,6 +98,16 @@ copy_lvm (void) snprintf (env, sizeof env, "%s/lvm", lvm_sy...
2016 Jul 26
8
[PATCH 0/5] Improve LVM handling in the appliance
Hi, this series improves the way LVM is used in the appliance: in particular, now lvmetad can eventually run at all, and with the correct configuration. Also improve the listing strategies. Thanks, Pino Toscano (5): daemon: lvm-filter: set also global_filter daemon: lvm-filter: start lvmetad better daemon: lvm: improve filter for LVs with activationskip flag set daemon: lvm: list
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...ror ("lzop: incorrect value for level parameter"); return -1; diff --git a/daemon/cpio.c b/daemon/cpio.c index d1459b15d..09491ac9c 100644 --- a/daemon/cpio.c +++ b/daemon/cpio.c @@ -33,8 +33,6 @@ #include "actions.h" #include "optgroups.h" -GUESTFSD_EXT_CMD(str_cpio, cpio); - /* Has one FileOut parameter. */ /* Takes optional arguments, consult optargs_bitmask. */ int @@ -82,7 +80,7 @@ do_cpio_out (const char *dir, const char *format) if (asprintf_nowarn (&cmd, "cd %Q && find -print0 | %s -0 -o -H %s --quiet",...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...ror ("lzop: incorrect value for level parameter"); return -1; diff --git a/daemon/cpio.c b/daemon/cpio.c index d1459b15d..0601a19ca 100644 --- a/daemon/cpio.c +++ b/daemon/cpio.c @@ -33,7 +33,7 @@ #include "actions.h" #include "optgroups.h" -GUESTFSD_EXT_CMD(str_cpio, cpio); +DECLARE_EXTERNAL_COMMANDS ("cpio") /* Has one FileOut parameter. */ /* Takes optional arguments, consult optargs_bitmask. */ @@ -82,7 +82,7 @@ do_cpio_out (const char *dir, const char *format) if (asprintf_nowarn (&cmd, "cd %Q && find -print0 | %s -0 -...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...th_error ("lzop: incorrect value for level parameter"); return -1; diff --git a/daemon/cpmv.c b/daemon/cpmv.c index ba7de2b..c182f68 100644 --- a/daemon/cpmv.c +++ b/daemon/cpmv.c @@ -25,24 +25,27 @@ #include "daemon.h" #include "actions.h" +GUESTFSD_EXT_CMD(str_cp, cp); +GUESTFSD_EXT_CMD(str_mv, mv); + static int cpmv_cmd (const char *cmd, const char *flags, const char *src, const char *dest); int do_cp (const char *src, const char *dest) { - return cpmv_cmd ("cp", NULL, src, dest); + return cpmv_cmd (str_cp, NULL, src, dest); } int do...
2012 Aug 30
1
[PATCH] collect list of called external commands
...ith_error ("lzop: incorrect value for level parameter"); return -1; diff --git a/daemon/cpmv.c b/daemon/cpmv.c index ba7de2b..d4bfe1d 100644 --- a/daemon/cpmv.c +++ b/daemon/cpmv.c @@ -25,24 +25,27 @@ #include "daemon.h" #include "actions.h" +GUESTFS_EXT_CMD(str_cp, cp); +GUESTFS_EXT_CMD(str_mv, mv); + static int cpmv_cmd (const char *cmd, const char *flags, const char *src, const char *dest); int do_cp (const char *src, const char *dest) { - return cpmv_cmd ("cp", NULL, src, dest); + return cpmv_cmd (str_cp, NULL, src, dest); } int do_...
2016 Jul 26
5
[PATCH v2 0/4] Improve LVM handling in the appliance
Hi, this series improves the way LVM is used in the appliance: in particular, now lvmetad can eventually run at all, and with the correct configuration. Also improve the listing strategies. Changes in v2: - dropped patch #5, will be sent separately - move lvmetad statup in own function (patch #2) Thanks, Pino Toscano (4): daemon: lvm-filter: set also global_filter daemon: lvm-filter:
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
Hi, currently /etc/shadow is edited manually when needed (i.e. when setting the password for an user), and it is not changed when removing users. Import the upstream shadow.aug (currently in their development serie, but not part of any released version yet), and use it only when the augeas version is less than a potential 1.2.1 (covering also the case when the new version is just 1.3.0). Pino
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’
2014 Aug 26
6
[PATCH 0/3] fix setting lvm filter with newer lvm2
Hi, newer lvm2 releases don't have have uncommented "filter" lines, so the current way to edit lvm.conf doesn't work anymore. Instead, switch to augeas (with a "custom" len) for a cleaner and working way to set the lvm filter. Pino Toscano (3): daemon: add add_sprintf daemon: move AUGEAS_ERROR to the common header daemon: lvm-filter: use augeas for setting the
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a real guest this time :-) You can test it out on a real guest (in this case, a CentOS disk image located at /tmp/centos-6.img) by doing: $ ./run guestfish -v -x -a /tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection --verbose" which will print lots of debugging, and at the end the
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see: https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/ v2 was previously posted here: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html To test this patch series on a real guest, you can do: $ ./run guestfish -v -x -a /var/tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...derr, "mkdtemp: %s: %m\n", lvm_system_dir); - exit (EXIT_FAILURE); - } + if (mkdtemp (lvm_system_dir) == NULL) + error (EXIT_FAILURE, errno, "mkdtemp: %s", lvm_system_dir); /* Copy the entire directory */ snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir); diff --git a/daemon/mount.c b/daemon/mount.c index 5dd7da2..ef51d48 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -22,6 +22,8 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <error.h> #include &lt...
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