mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-27 23:40:30 +00:00
btrfs-progs: fix build warnings in btrfslabel.c
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
7b668965f0
commit
4a64455231
@ -56,7 +56,7 @@ static int change_label_unmounted(char *dev, char *nLabel)
|
||||
*/
|
||||
root = open_ctree(dev, 0, 1);
|
||||
if (!root) /* errors are printed by open_ctree() */
|
||||
return;
|
||||
return -1;
|
||||
|
||||
trans = btrfs_start_transaction(root, 1);
|
||||
strncpy(root->fs_info->super_copy.label, nLabel, BTRFS_LABEL_SIZE);
|
||||
@ -65,6 +65,7 @@ static int change_label_unmounted(char *dev, char *nLabel)
|
||||
|
||||
/* Now we close it since we are done. */
|
||||
close_ctree(root);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_label_unmounted(char *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user