check_mounted returns a negative errno, so it needs to be flipped again before passing to strerror.
Signed-off-by: Eric Sandeen <sand...@redhat.com> --- cmds-restore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cmds-restore.c b/cmds-restore.c index 12b2188..9385042 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -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]); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html