From 41e7cf7483c89926f5650028e07a54f9052884c4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 8 Sep 2016 12:09:34 +0200 Subject: [PATCH] libfstools: add ext4 filesystem type Signed-off-by: Felix Fietkau --- libfstools/libfstools.h | 1 + libfstools/overlay.c | 3 +++ mount_root.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/libfstools/libfstools.h b/libfstools/libfstools.h index f5ca75c..0398c96 100644 --- a/libfstools/libfstools.h +++ b/libfstools/libfstools.h @@ -28,6 +28,7 @@ enum { FS_DEADCODE, FS_UBIFS, FS_F2FS, + FS_EXT4, }; enum fs_state { diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 5215ff3..ed0f304 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -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))) diff --git a/mount_root.c b/mount_root.c index aaafeca..dffb0a6 100644 --- a/mount_root.c +++ b/mount_root.c @@ -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: -- 2.25.1