]> git.ipfire.org Git - thirdparty/util-linux.git/commit
wipefs: Add --force option to force it to erase.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 19 Nov 2012 15:02:13 +0000 (15:02 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Nov 2012 09:01:20 +0000 (10:01 +0100)
commit2968c3fc7388f88b8debe64d61d9785601c16436
treeca1278490003244817a3612d5044764e87f616d0
parent933956cb499e12d0d0e5228b6de34ffa5c9a9e08
wipefs: Add --force option to force it to erase.

Commit c550f728f724360f99aae0fdb45b0589d9a347e0 added O_EXCL when
opening the thing to erase.  This broke the wipefs utility when used
on anything which isn't an unmounted filesystem.  eg. If you use it on
a block device containing partitions, then it won't work because the
kernel recognizes the partitions and so thinks the device is in use.

This change adds the --force option which, when used, undoes the above
flag change.  However you still have to use --force most of the time
when erasing something that isn't a plain unmounted filesystem.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
misc-utils/wipefs.8
misc-utils/wipefs.c