summaryrefslogtreecommitdiff
path: root/btrfstune.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-18 19:47:28 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-18 19:49:44 +0200
commitbdc6c859c40eb77c3cfc97b4a7f7eee84689064b (patch)
tree090bb9c9bad6961b1e2b8ba306438d2bad129ccc /btrfstune.c
parent6107844cd58c94eecbf65d8199e0a4dc61db2f29 (diff)
btrfs-progs: btrfstune: print correct current uuid during rewrite
uuid_unparse is supposed to take the ASCII representation of a UUID, so we have to pass the raw fsid buffer. Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'btrfstune.c')
-rw-r--r--btrfstune.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfstune.c b/btrfstune.c
index 4e42c5ce..6f07f314 100644
--- a/btrfstune.c
+++ b/btrfstune.c
@@ -349,7 +349,7 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str)
fs_info->new_fsid = new_fsid;
fs_info->new_chunk_tree_uuid = new_chunk_id;
- uuid_parse((const char*)fs_info->fsid, old_fsid);
+ memcpy(old_fsid, (const char*)fs_info->fsid, BTRFS_UUID_SIZE);
uuid_unparse(old_fsid, uuid_buf);
printf("Current fsid: %s\n", uuid_buf);