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:
53e5683
)
btrfs-progs: pass positive errno to strerror in cmd_df()
author
Eric Sandeen
<sandeen@redhat.com>
Wed, 6 Nov 2013 23:15:50 +0000
(17:15 -0600)
committer
Chris Mason
<chris.mason@fusionio.com>
Thu, 7 Nov 2013 21:10:41 +0000
(16:10 -0500)
get_df returns a negative error number, but then
we pass it to strerror, which wants a positive value...
Resolves-Coverity-CID: 1125929
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
cmds-filesystem.c
patch
|
blob
|
history
diff --git
a/cmds-filesystem.c
b/cmds-filesystem.c
index
376037b
..
b4727c2
100644
(file)
--- a/
cmds-filesystem.c
+++ b/
cmds-filesystem.c
@@
-173,7
+173,7
@@
static int cmd_df(int argc, char **argv)
print_df(sargs);
free(sargs);
} else {
- fprintf(stderr, "ERROR: get_df failed %s\n", strerror(ret));
+ fprintf(stderr, "ERROR: get_df failed %s\n", strerror(
-
ret));
}
close_file_or_dir(fd, dirstream);