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:
Eric Sandeen 2013-11-06 17:15:50 -06:00 committed by Chris Mason
parent 53e56831b0
commit 7e29db9e49
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ static int cmd_df(int argc, char **argv)
print_df(sargs); print_df(sargs);
free(sargs); free(sargs);
} else { } 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); close_file_or_dir(fd, dirstream);