[PATCH] Btrfs-progs: make btrfsctl return values like everybody else

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

 



This patch makes btrfsctl return 0 for success and 1 for failure, which is the
behavior of all other userspace applications.  Thanks,

Signed-off-by: Josef Bacik <josef@xxxxxxxxxx>
---
 btrfsctl.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/btrfsctl.c b/btrfsctl.c
index 66c4e89..73d9c30 100644
--- a/btrfsctl.c
+++ b/btrfsctl.c
@@ -231,9 +231,7 @@ int main(int ac, char **av)
 		printf("ioctl failed with error %d\n", ret);
 	}
 	printf("%s\n", BTRFS_BUILD_VERSION);
-	if (ret)
-		exit(0);
-	else
-		exit(1);
+
+	return ret ? 1 : 0;
 }
 
-- 
1.6.6

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