RHEL 5: Use mke4fs on RHEL 5 as replacement for mke2fs.

This commit is contained in:
Richard W.M. Jones
2011-03-25 14:42:40 +00:00
parent 227bea6c7e
commit a0e3b21837
3 changed files with 10 additions and 3 deletions

View File

@@ -41,13 +41,17 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize, const char
int r;
char *err;
char mke2fs[] = "mke2fs";
if (e2prog (mke2fs) == -1)
return -1;
/* 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"))
argv[i++] = "mke2fs";
argv[i++] = mke2fs;
else
argv[i++] = "mkfs";