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>
This commit is contained in:
David Sterba 2015-06-18 19:47:28 +02:00
parent 6107844cd5
commit bdc6c859c4
1 changed files with 1 additions and 1 deletions

View File

@ -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);