diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index f5bc0012..83844eda 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,9 @@ +2006-03-18 Theodore Ts'o + + * 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 * Fix bug in icheck which incorrectly reports the last valid inode diff --git a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in index e9b06d67..8db23d5a 100644 --- a/debugfs/debugfs.8.in +++ b/debugfs/debugfs.8.in @@ -335,18 +335,17 @@ device numbers must be specified. 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. diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 7eb7dc62..992a2b72 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -128,7 +128,7 @@ void do_open_filesys(int argc, char **argv) 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 @@ void do_open_filesys(int argc, char **argv) case 'f': open_flags |= EXT2_FLAG_FORCE; break; + case 'e': + open_flags |= EXT2_FLAG_EXCLUSIVE; + break; case 'c': catastrophic = 1; break;