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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Set the correct return value.

Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
---
 cmds-subvolume.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index f7249f8..8be6df7 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -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;
 	}
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux