From 616059bf23223648bd3bd04b4c7cfe3fb569e46e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 18 Mar 2006 20:02:05 -0500 Subject: [PATCH] Change mke2fs to create filesystems with the device opened in exclusive mode. Signed-off-by: "Theodore Ts'o" --- misc/ChangeLog | 5 +++++ misc/mke2fs.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index dd1c1da..511d29b 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2006-03-18 Theodore Ts'o + + * mke2fs.c (main): Open the filesystem in exclusive mode while we + are initializing it. + 2005-12-31 Theodore Ts'o * chattr.1.in: Add notes in the man page to make sure the reader diff --git a/misc/mke2fs.c b/misc/mke2fs.c index c80c1ef..7d9b898 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1429,7 +1429,7 @@ int main (int argc, char *argv[]) /* * Initialize the superblock.... */ - retval = ext2fs_initialize(device_name, 0, &fs_param, + retval = ext2fs_initialize(device_name, EXT2_FLAG_EXCLUSIVE, &fs_param, io_ptr, &fs); if (retval) { com_err(device_name, retval, _("while setting up superblock")); -- 1.8.3.1