]> git.pld-linux.org Git - packages/btrfs-progs.git/blob - btrfs-progs-fix-return-value.patch
- add patches from fedora
[packages/btrfs-progs.git] / btrfs-progs-fix-return-value.patch
1 From 8b6be4c65eda396e0c42182f4ebf2794c62b442c Mon Sep 17 00:00:00 2001
2 From: Josef Bacik <josef@redhat.com>
3 Date: Tue, 2 Feb 2010 09:51:15 -0500
4 Subject: [PATCH] Btrfs-progs: make btrfsctl return values like everybody else
5
6 This patch makes btrfsctl return 0 for success and 1 for failure, which is the
7 behavior of all other userspace applications.  Thanks,
8
9 Signed-off-by: Josef Bacik <josef@redhat.com>
10 ---
11  btrfsctl.c |    6 ++----
12  1 files changed, 2 insertions(+), 4 deletions(-)
13
14 diff --git a/btrfsctl.c b/btrfsctl.c
15 index 66c4e89..73d9c30 100644
16 --- a/btrfsctl.c
17 +++ b/btrfsctl.c
18 @@ -231,9 +231,7 @@ int main(int ac, char **av)
19                 printf("ioctl failed with error %d\n", ret);
20         }
21         printf("%s\n", BTRFS_BUILD_VERSION);
22 -       if (ret)
23 -               exit(0);
24 -       else
25 -               exit(1);
26 +
27 +       return ret ? 1 : 0;
28  }
29  
30 -- 
31 1.6.6
32
This page took 0.078401 seconds and 3 git commands to generate.