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:
parent
b5acfa282b
commit
3d118fe6c4
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue