Add an option to debugfs to open filesystems in exclusive mode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 7eb7dc6..992a2b7 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -128,7 +128,7 @@
char *data_filename = 0;
reset_getopt();
- while ((c = getopt (argc, argv, "iwfcb:s:d:")) != EOF) {
+ while ((c = getopt (argc, argv, "iwfecb:s:d:")) != EOF) {
switch (c) {
case 'i':
open_flags |= EXT2_FLAG_IMAGE_FILE;
@@ -139,6 +139,9 @@
case 'f':
open_flags |= EXT2_FLAG_FORCE;
break;
+ case 'e':
+ open_flags |= EXT2_FLAG_EXCLUSIVE;
+ break;
case 'c':
catastrophic = 1;
break;