search for: str_uuidgen

Displaying 13 results from an estimated 13 matches for "str_uuidgen".

2015 Jun 26
1
Re: [PATCH v3.1 7/9] New API: swap_set_uuid_random
...x 26fe30d..923adb2 100644 > --- a/daemon/swap.c > +++ b/daemon/swap.c > @@ -34,6 +34,7 @@ GUESTFSD_EXT_CMD(str_mkswap, mkswap); > GUESTFSD_EXT_CMD(str_swapon, swapon); > GUESTFSD_EXT_CMD(str_swapoff, swapoff); > GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); > +GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); > > /* Confirmed this is true for Linux swap partitions from the Linux sources. */ > #define SWAP_LABEL_MAX 16 > @@ -255,3 +256,34 @@ swap_set_uuid (const char *device, const char *uuid) > > return 0; > } > + > +char * > +get_random_uuid (void) &gt...
2015 Jun 26
0
[PATCH v3.1 7/9] New API: swap_set_uuid_random
.../daemon/swap.c b/daemon/swap.c index 26fe30d..923adb2 100644 --- a/daemon/swap.c +++ b/daemon/swap.c @@ -34,6 +34,7 @@ GUESTFSD_EXT_CMD(str_mkswap, mkswap); GUESTFSD_EXT_CMD(str_swapon, swapon); GUESTFSD_EXT_CMD(str_swapoff, swapoff); GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); +GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); /* Confirmed this is true for Linux swap partitions from the Linux sources. */ #define SWAP_LABEL_MAX 16 @@ -255,3 +256,34 @@ swap_set_uuid (const char *device, const char *uuid) return 0; } + +char * +get_random_uuid (void) +{ + int r; + char *out; + CLEANUP_FREE char *err...
2015 Jun 30
0
[PATCH v4 5/7] daemon: add get_random_uuid
...nfo about these. In GCC 4.8.0 the warning is even harder to diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 584c685..7f4b2f2 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -57,6 +57,7 @@ #include "daemon.h" GUESTFSD_EXT_CMD(str_udevadm, udevadm); +GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); #ifndef MAX # define MAX(a,b) ((a)>(b)?(a):(b)) @@ -1509,6 +1510,24 @@ udev_settle (void) fprintf (stderr, "warning: udevadm command failed\n"); } +char * +get_random_uuid (void) +{ + int r; + char *out; + CLEANUP_FREE char *err = NULL; + + r = command (&...
2017 Apr 13
0
Re: [PATCH v2 1/2] daemon: run 'udevadm settle' with --exit-if-exists option
...stfsd.c b/daemon/guestfsd.c > index 85ce5d2ad..b82c98acd 100644 > --- a/daemon/guestfsd.c > +++ b/daemon/guestfsd.c > @@ -63,6 +63,8 @@ > > #include "daemon.h" > > +#define MAX_ARGS 64 > + > GUESTFSD_EXT_CMD(str_udevadm, udevadm); > GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); > > @@ -1213,20 +1215,35 @@ random_name (char *template) > * fussed if it fails. > */ > void > -udev_settle (void) > +udev_settle_file (const char *file) > { > - char cmd[80]; > + const char *argv[MAX_ARGS]; > + CLEANUP_FREE char *err = NULL; &...
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (9): uuid: add support to change uuid of btrfs partition uuid: use existing function of
2015 Jun 30
13
[PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (7):
2016 Jan 21
0
[PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
...LINK_FREE -#define CLEANUP_CLOSE -#define CLEANUP_AUG_CLOSE -#define CLEANUP_FREE_STRINGSBUF -#endif - #endif /* GUESTFSD_DAEMON_H */ diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index b313534..00f53c6 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -68,10 +68,6 @@ GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); # define O_CLOEXEC 0 #endif -/* For improved readability dealing with pipe arrays */ -#define PIPE_READ 0 -#define PIPE_WRITE 1 - /* If root device is an ext2 filesystem, this is the major and minor. * This is so we can ignore this device from the point of view of the * user, eg...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
..., device, NULL); if (r == -1) { if (verbose) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index b3f40628b..bcded501a 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -63,9 +63,6 @@ #include "daemon.h" -GUESTFSD_EXT_CMD(str_udevadm, udevadm); -GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); - #ifndef MAX # define MAX(a,b) ((a)>(b)?(a):(b)) #endif @@ -1095,7 +1092,7 @@ udev_settle_file (const char *file) size_t i = 0; int r; - ADD_ARG (argv, i, str_udevadm); + ADD_ARG (argv, i, "udevadm"); if (verbose) ADD_ARG (argv, i, "--debug");...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
..., device, NULL); if (r == -1) { if (verbose) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index b3f40628b..86592e8dc 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -63,8 +63,7 @@ #include "daemon.h" -GUESTFSD_EXT_CMD(str_udevadm, udevadm); -GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); +DECLARE_EXTERNAL_COMMANDS ("udevadm", "uuidgen") #ifndef MAX # define MAX(a,b) ((a)>(b)?(a):(b)) @@ -144,6 +143,7 @@ main (int argc, char *argv[]) { "channel", 1, 0, 'c' }, { "listen", 0, 0, 'l' }, { "net...
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’
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