]> err.no Git - util-linux/commit
disk-utils: let mkfs tools open with O_EXCL
authorMatthias Koenig <mkoenig@suse.de>
Wed, 18 Jul 2007 14:15:46 +0000 (16:15 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 27 Jul 2007 11:39:29 +0000 (13:39 +0200)
commit2018629905d3d881ff3fddf76552b6e79091f2b8
treef51632da5d7c7a47a83ec77f94174dd265ecd7ed
parent8e522bb7e9c051a5123e05d8af302b0a1709fe98
disk-utils: let mkfs tools open with O_EXCL

Let mkswap, mkfs.bfs, mkfs.minix open with O_EXCL if
used on block devices to prevent writing to the device
even if they are busy (mounted).

Unfortunately, O_EXCL has zero effect for 2.4 kernels where
in-kernel code doesn't use O_EXCL-like access locks. (Tested
on RHEL3.)

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.bfs.c
disk-utils/mkfs.minix.c
disk-utils/mkswap.c