[PATCH 3/3] btrfs-progs: fix wrong return value

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

 



From: Miao Xie <miaox@xxxxxxxxxxxxxx>

btrfsctl returns 1 if it does something successfully. this patch fixes this
problem.

Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
---
 btrfsctl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/btrfsctl.c b/btrfsctl.c
index be6bf25..e2aae17 100644
--- a/btrfsctl.c
+++ b/btrfsctl.c
@@ -249,8 +249,8 @@ int main(int ac, char **av)
 	}
 	printf("%s\n", BTRFS_BUILD_VERSION);
 	if (ret)
-		exit(0);
-	else
 		exit(1);
+
+	return 0;
 }
 
-- 
1.6.5.2


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