Skip to contentSkip to conversation

Btrfs-progs: set return value to 0 if subvolume get-default successfully

PATCH New Eryu Guan 1 participant 1 message Nov 6, 2013 Btrfs file system

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 Btrfs-progs: set return value to 0 if subvolume get-default successfully

cmd_subvol_get_default() returns 1 even if finds default subvolume successfully.

Set the correct return value.

---
 cmds-subvolume.c | 1 +
 1 file changed, 1 insertion(+)
cmds-subvolume.c +1 -0
index f7249f8..8be6df7 100644
@@ -691,6 +691,7 @@ static int cmd_subvol_get_default(int argc, char **argv)
 	/* no need to resolve roots if FS_TREE is default */
 	if (default_id == BTRFS_FS_TREE_OBJECTID) {
 		printf("ID 5 (FS_TREE)\n");
+		ret = 0;
 		goto out;
 	}
 
Signature · 1 line
1.8.3.1