projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5acfa2
)
btrfs-progs: provide positive errno to strerror in cmd_restore
author
Eric Sandeen
<sandeen@redhat.com>
Mon, 25 Feb 2013 22:54:44 +0000
(16:54 -0600)
committer
David Sterba
<dsterba@suse.cz>
Wed, 27 Feb 2013 13:39:48 +0000
(14:39 +0100)
check_mounted returns a negative errno, so it needs to be flipped
again before passing to strerror.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
cmds-restore.c
patch
|
blob
|
history
diff --git
a/cmds-restore.c
b/cmds-restore.c
index
12b2188
..
9385042
100644
(file)
--- a/
cmds-restore.c
+++ b/
cmds-restore.c
@@
-836,7
+836,7
@@
int cmd_restore(int argc, char **argv)
if ((ret = check_mounted(argv[optind])) < 0) {
fprintf(stderr, "Could not check mount status: %s\n",
- strerror(ret));
+ strerror(
-
ret));
return ret;
} else if (ret) {
fprintf(stderr, "%s is currently mounted. Aborting.\n", argv[optind]);