diff options
author | Wanlong Gao <wanlong.gao@gmail.com> | 2011-12-02 21:47:51 +0800 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-12-02 14:01:28 +0000 |
commit | 1970a14178b5c53569965d35e54efead6c4c4bdc (patch) | |
tree | 6de1d5f856d53467c52bca0899541c2f58290c7f | |
parent | 1a35ca59088e572c11633e85524bb282cb436186 (diff) | |
download | libguestfs-1970a14178b5c53569965d35e54efead6c4c4bdc.tar.gz libguestfs-1970a14178b5c53569965d35e54efead6c4c4bdc.tar.xz libguestfs-1970a14178b5c53569965d35e54efead6c4c4bdc.zip |
mkfs: enable to make xfs filesystems when the device already has a filesystem
Just add the -f option to mkfs.xfs to make sure we can
make a xfs filesystem when the device already has a
filesystem on it.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
-rw-r--r-- | daemon/mkfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/daemon/mkfs.c b/daemon/mkfs.c index f3975dcb..a2c23667 100644 --- a/daemon/mkfs.c +++ b/daemon/mkfs.c @@ -85,6 +85,9 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize, if (STREQ (fstype, "jfs")) ADD_ARG (argv, i, "-f"); + if (STREQ (fstype, "xfs")) + ADD_ARG (argv, i, "-f"); + /* For GFS, GFS2, assume a single node. */ if (STREQ (fstype, "gfs") || STREQ (fstype, "gfs2")) { ADD_ARG (argv, i, "-p"); |