diff mbox

btrfs-progs: print the right mount checking info in restore.c

Message ID 50AB22A6.6070203@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang Sheng-Hui Nov. 20, 2012, 6:26 a.m. UTC
The mount status is checked against the arg <device> (argv[optind]),
not the <directory>. Correct the info printed on <device> mounted.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
 restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/restore.c b/restore.c
index b9e5381..a7580f8 100644
--- a/restore.c
+++ b/restore.c
@@ -827,7 +827,7 @@  int main(int argc, char **argv)
 			strerror(ret));
 		return ret;
 	} else if (ret) {
-		fprintf(stderr, "%s is currently mounted.  Aborting.\n", argv[optind + 1]);
+		fprintf(stderr, "%s is currently mounted.  Aborting.\n", argv[optind]);
 		return -EBUSY;
 	}