diff mbox series

[4/4] palo: add support for formatting as ext4

Message ID 1562357840.10899.9.camel@HansenPartnership.com
State New
Headers show
Series bring parisc linux into the modern age by adding ext4 support to the bootloader | expand

Commit Message

James Bottomley July 5, 2019, 8:17 p.m. UTC
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>
---
 palo/palo.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;