+ /* For ext2/3/4 run the mke2fs program directly. This is because
+ * the mkfs program "eats" some options, in particular the -F
+ * option.
+ */
+ if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
+ STREQ (fstype, "ext4")) {
+ if (e2prog (mke2fs) == -1)
+ return -1;
+ ADD_ARG (argv, i, mke2fs);
+ }
+ else
+ ADD_ARG (argv, i, "mkfs");
+
+ ADD_ARG (argv, i, "-t");
+ ADD_ARG (argv, i, fstype);
+
+ /* Force mke2fs to create a filesystem, even if it thinks it
+ * shouldn't (RHBZ#690819).
+ */
+ if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
+ STREQ (fstype, "ext4"))
+ ADD_ARG (argv, i, "-F");