Skip to contentSkip to conversation

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

PATCH New Wang Sheng-Hui 1 participant 1 message Nov 20, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
restore.c +1 -1
index b9e5381..a7580f8 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.5.4