* [PATCH] Btrfs-progs: make btrfsctl return values like everybody else
@ 2010-02-02 14:52 Josef Bacik
0 siblings, 0 replies; only message in thread
From: Josef Bacik @ 2010-02-02 14:52 UTC (permalink / raw)
To: linux-btrfs
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@redhat.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-02 14:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-02 14:52 [PATCH] Btrfs-progs: make btrfsctl return values like everybody else Josef Bacik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).