[PATCH v2 2/2] erofs-utils: fsck: add warning for unsupported file types during extraction

Nithurshen nithurshen.dev at gmail.com
Mon Mar 16 21:52:42 AEDT 2026


When extracting an image using fsck.erofs, if the tool encounters
an unsupported file type (falling into the default case of the
switch statement), it currently skips extraction silently and jumps
straight to verifying the data chunk layout.

Add a warning message to the default case so the user is explicitly
informed that a specific file type was not extracted, rather than
failing silently.

Signed-off-by: Nithurshen <nithurshen.dev at gmail.com>
---
 fsck/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fsck/main.c b/fsck/main.c
index 16cc627..16a354f 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -963,7 +963,8 @@ verify:
 		ret = erofs_extract_special(inode);
 		break;
 	default:
-		/* TODO */
+		erofs_warn("unsupported file type %o @ nid %llu, skipped extraction",
+			inode->i_mode, inode->nid | 0ULL);
 		goto verify;
 	}
 	if (ret && ret != -ECANCELED)
-- 
2.51.0



More information about the Linux-erofs mailing list