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

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>
This commit is contained in:
Wang Sheng-Hui 2012-11-20 14:26:46 +08:00 committed by David Sterba
parent 88016b0ee9
commit 8c5b2ae588

View File

@ -830,7 +830,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;
}