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>
This commit is contained in:
NeilBrown 2008-12-18 14:04:45 +11:00
parent 504fb2e7f3
commit 22eba51216
1 changed files with 1 additions and 1 deletions

2
Kill.c
View File

@ -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",