summaryrefslogtreecommitdiff
path: root/Kill.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-12-18 14:04:45 +1100
committerNeilBrown <neilb@suse.de>2008-12-18 14:04:45 +1100
commit22eba5121632c4b26541fbb04209a90b93c24bcc (patch)
treee3fc1f341d7e8d4418b32dcf171aa12ab344482e /Kill.c
parent504fb2e7f35884745d3f40ad037f42b4a515f33b (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kill.c b/Kill.c
index 0a2763ea..b1e19b56 100644
--- a/Kill.c
+++ b/Kill.c
@@ -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",