diff options
author | Theodore Ts'o <tytso@mit.edu> | 2006-03-18 19:58:13 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2006-03-18 19:58:13 -0500 |
commit | 98eb44bdb5749f323a858d71bf5e7f0eddb61191 (patch) | |
tree | 6307bd6b00a86b8afc0657883e6a4b6c4defb29a | |
parent | 39c47ce6417b81aa74596fd0d4d98d542525a444 (diff) | |
download | e2fsprogs-98eb44bdb5749f323a858d71bf5e7f0eddb61191.tar.gz |
Add an option to debugfs to open filesystems in exclusive mode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | debugfs/ChangeLog | 6 | ||||
-rw-r--r-- | debugfs/debugfs.8.in | 13 | ||||
-rw-r--r-- | debugfs/debugfs.c | 5 |
3 files changed, 16 insertions, 8 deletions
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 <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 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; |