diff options
author | Karel Zak | 2012-10-15 12:38:09 +0200 |
---|---|---|
committer | Karel Zak | 2012-10-15 12:38:09 +0200 |
commit | c550f728f724360f99aae0fdb45b0589d9a347e0 (patch) | |
tree | f02ca09322e25744a991479f43afd3e248475529 /misc-utils | |
parent | libmount: don't use umount optimization for -l or -f (diff) | |
download | kernel-qcow2-util-linux-c550f728f724360f99aae0fdb45b0589d9a347e0.tar.gz kernel-qcow2-util-linux-c550f728f724360f99aae0fdb45b0589d9a347e0.tar.xz kernel-qcow2-util-linux-c550f728f724360f99aae0fdb45b0589d9a347e0.zip |
wipefs: use O_EXCL
Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/wipefs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index cddad8a0e..0ddc148d0 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -309,7 +309,7 @@ static void do_wipe_real(blkid_probe pr, const char *devname, struct wipe_desc * static struct wipe_desc * do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet) { - blkid_probe pr = new_probe(devname, O_RDWR); + blkid_probe pr = new_probe(devname, O_RDWR | O_EXCL); struct wipe_desc *w, *wp0 = clone_offset(wp); int zap = all ? 1 : wp->zap; |