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>
This commit is contained in:
parent
53e56831b0
commit
7e29db9e49
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue