diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-02-14 12:30:03 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-19 11:15:31 +0100 |
commit | 2a2d8e1962e8b6cda7b0a7584f6d2fb95d442cb6 (patch) | |
tree | baf0bcadc48c146e25717f1506ab46edbb8194ad /Makefile | |
parent | 3b85739dd6c63c8f94f87d6574494919d2c1119f (diff) |
btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table
The core of this is shamelessly stolen from xfsprogs.
Use blkid to detect an existing filesystem or partition
table on any of the target devices. If something is found,
require the '-f' option to overwrite it, hopefully avoiding
disaster due to mistyped devicenames, etc.
# mkfs.btrfs /dev/sda1
WARNING! - Btrfs v0.20-rc1-59-gd00279c-dirty IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using
/dev/sda1 appears to contain an existing filesystem (xfs).
Use the -f option to force overwrite.
#
This does introduce a requirement on libblkid.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -19,7 +19,7 @@ DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ INSTALL = install prefix ?= /usr/local bindir = $(prefix)/bin -LIBS=-luuid -lm -lz +LIBS=-luuid -lblkid -lm -lz ifeq ("$(origin V)", "command line") BUILD_VERBOSE = $(V) |