This patch adds UFS2 filesystem support to petitboot. It is necessary for booting FreeBSD on PS3.

Signed-off-by: Phileas Fogg <[email protected]>
---

--- a/discover/device-handler.c    2012-01-25 19:35:09.000000000 +0100
+++ b/discover/device-handler.c    2012-01-28 23:53:27.789435288 +0100
@@ -183,7 +183,7 @@
 static int mount_device(struct discover_context *ctx)
 {
     const char *mountpoint;
-    const char *argv[6];
+    const char *argv[8];

     if (!ctx->mount_path) {
         mountpoint = mountpoint_for_device(ctx->device_path);
@@ -201,9 +201,23 @@
     argv[4] = "ro";
     argv[5] = NULL;

+    if (!pb_run_cmd(argv))
+        goto mounted;
+
+    argv[0] = MOUNT_BIN;
+    argv[1] = ctx->device_path;
+    argv[2] = ctx->mount_path;
+    argv[3] = "-t";
+    argv[4] = "ufs";
+    argv[5] = "-o";
+    argv[6] = "ro,ufstype=ufs2";
+    argv[7] = NULL;
+
     if (pb_run_cmd(argv))
         goto out_rmdir;

+mounted:
+
     setup_device_links(ctx);
     return 0;


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to