git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a35ca5
)
mkfs: enable to make xfs filesystems when the device already has a filesystem
author
Wanlong Gao
<wanlong.gao@gmail.com>
Fri, 2 Dec 2011 13:47:51 +0000
(21:47 +0800)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 2 Dec 2011 14:01:28 +0000
(14:01 +0000)
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>
daemon/mkfs.c
patch
|
blob
|
history
diff --git
a/daemon/mkfs.c
b/daemon/mkfs.c
index
f3975dc
..
a2c2366
100644
(file)
--- 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");