btrfs-progs: fix build warnings in btrfslabel.c

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2013-01-28 19:29:32 +01:00
parent 7b668965f0
commit 4a64455231
1 changed files with 2 additions and 1 deletions

View File

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