summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2019-07-05 13:17:20 -0700
committerHelge Deller <deller@gmx.de>2019-07-07 16:19:18 +0200
commit0abec85fce0d9c744757ddd246c55a5e3c8359d6 (patch)
tree5747931612a23e6263cfcb8bd47c76404238c7a8
parent5a21ddafd40d20efcf40fbfbc6531f2cbec340f4 (diff)
downloadpalo-0abec85fce0d9c744757ddd246c55a5e3c8359d6.tar.gz
palo: add support for formatting as ext4
Now that iplboot can read ext4 filesystem, allow palo to create them with the palo --format-as=4 option. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--palo/palo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/palo/palo.c b/palo/palo.c
index e088993..26da01b 100644
--- a/palo/palo.c
+++ b/palo/palo.c
@@ -506,8 +506,8 @@ do_formatted(int init, int media, const char *medianame, int partition,
}
}
- sprintf(cmd, "mke2fs %s -O^resize_inode -b %d -l %s %s", do_format == 3 ? "-j" : "",
- EXT2_BLOCKSIZE, badblockfilename, partitionname);
+ sprintf(cmd, "mke2fs -t ext%d -O^resize_inode -b %d -l %s %s",
+ do_format, EXT2_BLOCKSIZE, badblockfilename, partitionname);
if (verbose)
printf("Executing: %s\n", cmd);
@@ -868,6 +868,8 @@ main(int argc, char *argv[])
format_as = 2;
else if(strcmp(optarg, "3") == 0)
format_as = 3;
+ else if (strcmp(optarg, "4") == 0)
+ format_as = 4;
else
error(0, argv[0]);
break;