search for: has_uuid_opt

Displaying 20 results from an estimated 21 matches for "has_uuid_opt".

Did you mean: has_uuid_opts
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...char *device) +blkid_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", &qu...
2015 Jun 24
10
[PATCH 0/5] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existed functions. -- Introduce new API: btrfstune_set_uuid_random Chen Hanxiao (5): uuid: add support to change uuid of btrfs partition uuid: use existed function of ext2 uuid: use newly introduced
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 Jul 02
1
[PATCH v6] New API: set_uuid_random
...daemon/btrfs.c b/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&quo...
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...ce, int svalue) > return 0; > } > > +int > +btrfstune_set_uuid (const char *device, const char *uuid) Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an implementation detail of it. > +{ > + CLEANUP_FREE char *err = NULL; > + int r; > + int has_uuid_opts = test_btrftune_uuid_opt (); > + > + if (has_uuid_opts == 0) { Check for <= 0 here, to consider errors in test_btrftune_uuid_opt on the safe side. > + reply_with_error ("btrfstune do not support '-u'"); reply_with_error ("btrfs filesystems' UUID canno...
2015 Jun 24
0
[PATCH 5/5] New API: btrfstune_set_uuid_random
...s.c b/daemon/btrfs.c index b82c1b9..e4d8b64 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -867,6 +867,27 @@ btrfstune_set_uuid (const char *device, const char *uuid) return 0; } +int +do_btrfstune_set_uuid_random (const char *device) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrftune_uuid_opt(); + + if (has_uuid_opts == 0) { + reply_with_error ("btrfstune do not support '-u'"); + return -1; + } + + r = commandr (NULL, &err, str_btrfstune, "-u", device, NULL); + if (r == -1) { + reply_with_error("%s: %s", de...
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 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...daemon/btrfs.c b/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) { +...
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...+ + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfstune_set_uuid (const char *device, const char *uuid) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrftune_uuid_opt (); + + if (has_uuid_opts == 0) { + reply_with_error ("btrfstune do not support '-u'"); + return -1; + } + + r = commandr (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); + + if (r == -1) { + reply_with_err...
2015 Jun 26
0
[PATCH v3 1/4] uuid: add support to change uuid of btrfs partition
...= 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfs_set_uuid (const char *device, const char *uuid) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrftune_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", uuid, device, NULL); + + if (r ==...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...= 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfs_set_uuid (const char *device, const char *uuid) +{ + 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", uuid, device, NULL); + + if (r =...
2015 Jun 30
0
[PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
...= 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -814,6 +852,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfs_set_uuid (const char *device, const char *uuid) +{ + 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", uuid, device, NULL); + + if (r =...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...daemon/btrfs.c b/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&quo...
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...gt; > +int > > +btrfstune_set_uuid (const char *device, const char *uuid) > > Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an > implementation detail of it. > > > +{ > > + CLEANUP_FREE char *err = NULL; > > + int r; > > + int has_uuid_opts = test_btrftune_uuid_opt (); > > + > > + if (has_uuid_opts == 0) { > > Check for <= 0 here, to consider errors in test_btrftune_uuid_opt > on the safe side. > > > + reply_with_error ("btrfstune do not support '-u'"); > > reply_with_e...
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 26
5
[PATCH v3 0/4] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3: set errno if feature is not available. Chen Hanxiao (4): uuid: add support to change uuid of btrfs partition uuid: use existing function of ext2 uuid: use newly introduced
2015 Jun 26
3
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...g (const char *device, int svalue) > { > @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) > return 0; > } > > +int > +btrfs_set_uuid (const char *device, const char *uuid) > +{ > + 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"...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...", s_value, device, NULL); + r = commandr (NULL, &err, "btrfstune", "-S", s_value, device, NULL); if (r == -1) { reply_with_error ("%s: %s", device, err); return -1; @@ -887,7 +880,7 @@ btrfs_set_uuid (const char *device, const char *uuid) if (has_uuid_opts <= 0) NOT_SUPPORTED (-1, "btrfs filesystems' UUID cannot be changed"); - r = commandr (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); + r = commandr (NULL, &err, "btrfstune", "-f", "-U", uuid, device,...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...", s_value, device, NULL); + r = commandr (NULL, &err, "btrfstune", "-S", s_value, device, NULL); if (r == -1) { reply_with_error ("%s: %s", device, err); return -1; @@ -887,7 +883,7 @@ btrfs_set_uuid (const char *device, const char *uuid) if (has_uuid_opts <= 0) NOT_SUPPORTED (-1, "btrfs filesystems' UUID cannot be changed"); - r = commandr (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); + r = commandr (NULL, &err, "btrfstune", "-f", "-U", uuid, device,...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.