diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2011-08-28 14:23:24 +0300 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:59 -0400 |
commit | 3d7c94cfec7347e663106d2ca9db2b60dc9d8213 (patch) | |
tree | 7159c5fe581a53402f418c5b4b5e670140a3d340 /btrfs-select-super.c | |
parent | a8b624eae7c358d67a35e847bd25c29f846046f9 (diff) |
btrfsck: decode error properly
check_mounted() returns kernel-style negative errors.
Patch drops sign for strerror().
Before the patch:
check_mounted(): Could not open /dev/sdb2
Could not check mount status: Unknown error 18446744073709551603
After the patch:
check_mounted(): Could not open /dev/sdb2
Could not check mount status: Permission denied
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'btrfs-select-super.c')
-rw-r--r-- | btrfs-select-super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-select-super.c b/btrfs-select-super.c index f12f36ce..51eb9c96 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -75,7 +75,7 @@ int main(int ac, char **av) radix_tree_init(); if((ret = check_mounted(av[optind])) < 0) { - fprintf(stderr, "Could not check mount status: %s\n", strerror(ret)); + fprintf(stderr, "Could not check mount status: %s\n", strerror(-ret)); return ret; } else if(ret) { fprintf(stderr, "%s is currently mounted. Aborting.\n", av[optind]); |