search for: btrfsuuid

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

2015 Jun 23
2
[PATCH] uuid: add support to change uuid of btrfs partition
...2fs); GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); +GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); static int e2uuid (const char *device, const char *uuid) @@ -91,6 +92,21 @@ swapuuid (const char *device, const char *uuid) return 0; } +static int +btrfsuuid (const char *device, const char *uuid) +{ + int r; + CLEANUP_FREE char *err = NULL; + + r = command (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); + if (r == -1) { + reply_with_error ("%s", err); + return -1; + } + + return 0; +} + int d...
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...fs_get_label (const char *device); > diff --git a/daemon/uuids.c b/daemon/uuids.c > index 06b33e9..f7791ab 100644 > --- a/daemon/uuids.c > +++ b/daemon/uuids.c > @@ -91,6 +91,12 @@ swapuuid (const char *device, const char *uuid) > return 0; > } > > +static int > +btrfsuuid (const char *device, const char *uuid) > +{ > + return btrfstune_set_uuid (device, uuid); > +} What is this wrapper for? Just call btrfs_set_uuid below. > int > do_set_uuid (const char *device, const char *uuid) > { > @@ -111,8 +117,7 @@ do_set_uuid (const char *device, c...
2015 Jun 23
0
Re: [PATCH] uuid: add support to change uuid of btrfs partition
...GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); > +GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); > > static int > e2uuid (const char *device, const char *uuid) > @@ -91,6 +92,21 @@ swapuuid (const char *device, const char *uuid) > return 0; > } > > +static int > +btrfsuuid (const char *device, const char *uuid) > +{ > + int r; > + CLEANUP_FREE char *err = NULL; > + > + r = command (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); > + if (r == -1) { > + reply_with_error ("%s", err); > + ret...
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...ar *uuid); /*-- in ntfs.c --*/ extern char *ntfs_get_label (const char *device); diff --git a/daemon/uuids.c b/daemon/uuids.c index 06b33e9..f7791ab 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -91,6 +91,12 @@ swapuuid (const char *device, const char *uuid) return 0; } +static int +btrfsuuid (const char *device, const char *uuid) +{ + return btrfstune_set_uuid (device, uuid); +} + int do_set_uuid (const char *device, const char *uuid) { @@ -111,8 +117,7 @@ do_set_uuid (const char *device, const char *uuid) r = swapuuid (device, uuid); else if (STREQ (vfs_type, "btrfs...
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...f --git a/daemon/uuids.c b/daemon/uuids.c > > index 06b33e9..f7791ab 100644 > > --- a/daemon/uuids.c > > +++ b/daemon/uuids.c > > @@ -91,6 +91,12 @@ swapuuid (const char *device, const char *uuid) > > return 0; > > } > > > > +static int > > +btrfsuuid (const char *device, const char *uuid) > > +{ > > + return btrfstune_set_uuid (device, uuid); > > +} > > What is this wrapper for? Just call btrfs_set_uuid below. > > > int > > do_set_uuid (const char *device, const char *uuid) > > { > > @@ -...
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