diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-11-06 17:15:50 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-07 16:10:41 -0500 |
commit | 7e29db9e49f1bb23789f2fa34d0ae2e5608dc551 (patch) | |
tree | b2900518478b242489366ec149330289e63122bf /cmds-filesystem.c | |
parent | 53e56831b051c36bb229463349c12b407beb2c91 (diff) |
btrfs-progs: pass positive errno to strerror in cmd_df()
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>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r-- | cmds-filesystem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 376037b5..b4727c27 100644 --- 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); |