From 3d118fe6c4bd0a3e4ae3a0696aec41d60cfd7eef Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 25 Feb 2013 16:54:44 -0600 Subject: [PATCH] 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 --- cmds-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-restore.c b/cmds-restore.c index 12b21881..93850428 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]);