btrfs-progs: provide positive errno to strerror in cmd_restore

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>
This commit is contained in:
Eric Sandeen 2013-02-25 16:54:44 -06:00 committed by David Sterba
parent b5acfa282b
commit 3d118fe6c4
1 changed files with 1 additions and 1 deletions

View File

@ -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]);