diff options
author | NeilBrown <neilb@suse.de> | 2008-12-18 04:04:45 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-12-18 04:04:45 +0100 |
commit | 22eba5121632c4b26541fbb04209a90b93c24bcc (patch) | |
tree | e3fc1f341d7e8d4418b32dcf171aa12ab344482e /Kill.c | |
parent | Allow --config in --incremental mode. (diff) | |
download | mdadm-22eba5121632c4b26541fbb04209a90b93c24bcc.tar.xz mdadm-22eba5121632c4b26541fbb04209a90b93c24bcc.zip |
Kill: Don't use O_EXCL when --force is used.
We really want --zero-super --force to zero the superblock in
all situations. So don't open with O_EXCL - trust the user.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Kill.c')
-rw-r--r-- | Kill.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -44,7 +44,7 @@ int Kill(char *dev, int force, int quiet) int fd, rv = 0; struct supertype *st; - fd = open(dev, O_RDWR|O_EXCL); + fd = open(dev, O_RDWR|(force ? 0 : O_EXCL)); if (fd < 0) { if (!quiet) fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n", |