mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user