search for: btrfstune_set_uuid

Displaying 6 results from an estimated 6 matches for "btrfstune_set_uuid".

2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...result = 0; > + else > + result = 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 > +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) {...
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 do_xfs_admin_uuid of xfs uuid: use existed do_mkswap_U New API: btrfstune_set_uuid_random daemon/btrfs.c | 81 ++++++++++++++++++++...
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...(err, "-U") == NULL || strstr (err, "-u") == NULL) + result = 0; + else + result = 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 +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, s...
2015 Jun 25
0
Re: [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) > > 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 ();...
2015 Jun 24
0
[PATCH 4/5] uuid: use existed do_mkswap_U
...henhanxiao@cn.fujitsu.com> --- daemon/daemon.h | 3 +++ daemon/uuids.c | 13 +------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index aba6ef2..c887cfd 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -275,6 +275,9 @@ extern int btrfstune_set_uuid (const char *device, const char *uuid); /*-- in ntfs.c --*/ extern char *ntfs_get_label (const char *device); +/*-- in swap.c --*/ +extern int do_mkswap_U (const char *device, const char *uuid); + /* ordinary daemon functions use these to indicate errors * NB: you don't need to prefix th...
2015 Jun 24
0
[PATCH 5/5] New API: btrfstune_set_uuid_random
...c | 21 +++++++++++++++++++++ generator/actions.ml | 18 ++++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.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 '...