+2006-03-18 Theodore Ts'o <tytso@mit.edu>
+
+ * debugfs.c (do_open_filesys), debugfs.8.in: Add the -e option to
+ the open_filesystem command, which requests that the
+ filesystem be opened in exclusive mode.
+
2006-03-08 Theodore Ts'o <tytso@mit.edu>
* Fix bug in icheck which incorrectly reports the last valid inode
Take the requested list of inode numbers, and print a listing of pathnames
to those inodes.
.TP
-.I open [-w] [-f] [-i] [-c] [-b blocksize] [-s superblock] device
+.I open [-w] [-e] [-f] [-i] [-c] [-b blocksize] [-s superblock] device
Open a filesystem for editing. The
-.I -w
-flag causes the filesystem to be opened for writing. The
.I -f
flag forces the filesystem to be opened even if there are some unknown
or incompatible filesystem features which would normally
prevent the filesystem from being opened. The
-.IR -c ", " -b ", " -i ", " and " -s
-options behave the same as those to
-.B debugfs
-itself.
+.I -e
+flag causes the filesystem to be opened in exclusive mode. The
+.IR -b ", " -c ", " -i ", " -s ", and " -w
+options behave the same as the command-line options to
+.BR debugfs .
.TP
.I pwd
Print the current working directory.
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;
case 'f':
open_flags |= EXT2_FLAG_FORCE;
break;
+ case 'e':
+ open_flags |= EXT2_FLAG_EXCLUSIVE;
+ break;
case 'c':
catastrophic = 1;
break;