[Pkg-libvirt-commits] [libguestfs] 66/87: daemon: Always pass -F option to mkfs.ntfs.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:10:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository libguestfs.
commit a284d3db745799bed9f7e45f23b8c2f2be2398b2
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Tue Jan 28 18:53:25 2014 +0000
daemon: Always pass -F option to mkfs.ntfs.
Otherwise it moans about:
mkfs: ntfs: /dev/sda: /dev/sda is entire device, not just one partition.
Refusing to make a filesystem here!
This has been happening for a while, so I don't know why we didn't
notice it before. It even happens on RHEL 6.
A simple reproducer is:
virt-make-fs -t ntfs any-tarball.tar.gz test.img
(cherry picked from commit 40512c66af562886311b5eff50a505b95c5fbadd)
---
daemon/mkfs.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/daemon/mkfs.c b/daemon/mkfs.c
index 0d56cc6..95ab874 100644
--- a/daemon/mkfs.c
+++ b/daemon/mkfs.c
@@ -68,12 +68,15 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
if (extfs)
ADD_ARG (argv, i, "-F");
- /* mkfs.ntfs requires the -Q argument otherwise it writes zeroes
- * to every block and does bad block detection, neither of which
- * are useful behaviour for virtual devices.
+ /* mkfs.ntfs requires the -Q argument otherwise it writes zeroes to
+ * every block and does bad block detection, neither of which are
+ * useful behaviour for virtual devices. Also recent versions need
+ * to be forced to create filesystems on non-partitions.
*/
- if (STREQ (fstype, "ntfs"))
+ if (STREQ (fstype, "ntfs")) {
ADD_ARG (argv, i, "-Q");
+ ADD_ARG (argv, i, "-F");
+ }
/* mkfs.reiserfs produces annoying interactive prompts unless you
* tell it to be quiet.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list