libfstools: add ext4 filesystem type
authorFelix Fietkau <nbd@nbd.name>
Thu, 8 Sep 2016 10:09:34 +0000 (12:09 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 8 Sep 2016 11:05:57 +0000 (13:05 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
libfstools/libfstools.h
libfstools/overlay.c
mount_root.c

index f5ca75cbb064f8172582dd2e5c70a9d5b7e18141..0398c96d5cd8de37558c99620ca3ee3f832d0ed5 100644 (file)
@@ -28,6 +28,7 @@ enum {
        FS_DEADCODE,
        FS_UBIFS,
        FS_F2FS,
+       FS_EXT4,
 };
 
 enum fs_state {
index 5215ff3a06018db740ca6a604f6d36e78d5f59eb..ed0f30471614964ee603dd22674f08d4dd472792 100644 (file)
@@ -195,6 +195,8 @@ handle_whiteout(const char *dir)
 static char *overlay_fs_name(int type)
 {
        switch (type) {
+               case FS_EXT4:
+                       return "ext4";
                case FS_F2FS:
                        return "f2fs";
                case FS_UBIFS:
@@ -241,6 +243,7 @@ jffs2_switch(struct volume *v)
                foreachdir("/overlay/", handle_whiteout);
                break;
 
+       case FS_EXT4:
        case FS_F2FS:
        case FS_UBIFS:
                if (overlay_mount(v, overlay_fs_name(type)))
index aaafecad506407544710f0ff70e81e312015f628..dffb0a6c48ee9d9581baba626359005c956f874d 100644 (file)
@@ -71,6 +71,7 @@ start(int argc, char *argv[1])
                ULOG_NOTE("jffs2 not ready yet, using temporary tmpfs overlay\n");
                return ramoverlay();
 
+       case FS_EXT4:
        case FS_F2FS:
        case FS_JFFS2:
        case FS_UBIFS:
@@ -110,6 +111,7 @@ done(int argc, char *argv[1])
        case FS_DEADCODE:
                return jffs2_switch(v);
 
+       case FS_EXT4:
        case FS_F2FS:
        case FS_JFFS2:
        case FS_UBIFS: