search for: test_btrfstune_uuid_opt

Displaying 16 results from an estimated 16 matches for "test_btrfstune_uuid_opt".

2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...lkid_without_p_i_opt (const char *device) { char *s; DECLARE_STRINGSBUF (ret); diff --git a/daemon/btrfs.c b/daemon/btrfs.c index ee3464d..50b0ba8 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -876,7 +876,7 @@ btrfs_set_uuid (const char *device, const char *uuid) int has_uuid_opts = test_btrfstune_uuid_opt (); if (has_uuid_opts <= 0) - NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot be changed"); + NOT_SUPPORTED (-1, "btrfs filesystems' UUID cannot be changed"); r = commandr (NULL, &err, str_btrfstune, "-f", "-U", uuid, device,...
2015 Jun 26
3
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...change fsid to UUID > + * -u change fsid, use a random one > + * since v4.1 > + * We could check wheter 'btrfstune' support > + * '-u' and '-U UUID' option by checking the output of > + * 'btrfstune' command. > + */ > +static int > +test_btrfstune_uuid_opt (void) > +{ > + static int result = -1; > + if (result != -1) > + return result; > + > + CLEANUP_FREE char *err = NULL; > + > + int r = commandr (NULL, &err, str_btrfstune, NULL); > + > + if (r == -1) { > + reply_with_error ("btrfstune: %s",...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...and add two new options + * -U UUID change fsid to UUID + * -u change fsid, use a random one + * since v4.1 + * We could check wheter 'btrfstune' support + * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrfstune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /* FIXME currently btr...
2015 Jun 30
0
[PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
...and add two new options + * -U UUID change fsid to UUID + * -u change fsid, use a random one + * since v4.1 + * We could check wheter 'btrfstune' support + * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrfstune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, "--help", NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /*...
2015 Jul 01
5
[PATCH v5 0/3] 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. v5: use NOT_SUPPORTED macro improve testcases v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno
2015 Jun 29
1
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...ne > > > + * since v4.1 > > > + * We could check wheter 'btrfstune' support > > > + * '-u' and '-U UUID' option by checking the output of > > > + * 'btrfstune' command. > > > + */ > > > +static int > > > +test_btrfstune_uuid_opt (void) > > > +{ > > > + static int result = -1; > > > + if (result != -1) > > > + return result; > > > + > > > + CLEANUP_FREE char *err = NULL; > > > + > > > + int r = commandr (NULL, &err, str_btrfstune, NULL); >...
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):
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 Jul 02
1
[PATCH v6] New API: set_uuid_random
.../daemon/btrfs.c index 28a48cf..8fcfd81 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -872,6 +872,25 @@ btrfs_set_uuid (const char *device, const char *uuid) return 0; } +int +btrfs_set_uuid_random (const char *device) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrfstune_uuid_opt(); + + if (has_uuid_opts <= 0) + NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot be changed"); + + r = commandr (NULL, &err, str_btrfstune, "-f", "-u", device, NULL); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + retu...
2015 Jun 29
0
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...change fsid, use a random one > > + * since v4.1 > > + * We could check wheter 'btrfstune' support > > + * '-u' and '-U UUID' option by checking the output of > > + * 'btrfstune' command. > > + */ > > +static int > > +test_btrfstune_uuid_opt (void) > > +{ > > + static int result = -1; > > + if (result != -1) > > + return result; > > + > > + CLEANUP_FREE char *err = NULL; > > + > > + int r = commandr (NULL, &err, str_btrfstune, NULL); > > + > > + if (r == -1) { >...
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
.../daemon/btrfs.c index 4cdc6a7..2b0cae9 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -874,6 +874,27 @@ btrfs_set_uuid (const char *device, const char *uuid) return 0; } +int +btrfs_set_uuid_random (const char *device) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrfstune_uuid_opt(); + + if (has_uuid_opts <= 0) { + reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed"); + return -1; + } + + r = commandr (NULL, &err, str_btrfstune, "-f", "-u", device, NULL); + if (r == -1) { + reply_with_error (&quot...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
.../daemon/btrfs.c index 28a48cf..8fcfd81 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -872,6 +872,25 @@ btrfs_set_uuid (const char *device, const char *uuid) return 0; } +int +btrfs_set_uuid_random (const char *device) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrfstune_uuid_opt(); + + if (has_uuid_opts <= 0) + NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot be changed"); + + r = commandr (NULL, &err, str_btrfstune, "-f", "-u", device, NULL); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + retu...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...;add"); @@ -799,7 +792,7 @@ do_btrfs_device_delete (char *const *devices, const char *fs) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "device"); ADD_ARG (argv, i, "delete"); @@ -840,7 +833,7 @@ test_btrfstune_uuid_opt (void) CLEANUP_FREE char *err = NULL; - int r = commandr (NULL, &err, str_btrfstune, "--help", NULL); + int r = commandr (NULL, &err, "btrfstune", "--help", NULL); if (r == -1) { reply_with_error ("btrfstune: %s", err); @@ -868,7 +8...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...;add"); @@ -799,7 +795,7 @@ do_btrfs_device_delete (char *const *devices, const char *fs) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "device"); ADD_ARG (argv, i, "delete"); @@ -840,7 +836,7 @@ test_btrfstune_uuid_opt (void) CLEANUP_FREE char *err = NULL; - int r = commandr (NULL, &err, str_btrfstune, "--help", NULL); + int r = commandr (NULL, &err, "btrfstune", "--help", NULL); if (r == -1) { reply_with_error ("btrfstune: %s", err); @@ -868,7 +8...
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’