[PATCH 4/7] filetype: let cdev_detect_type() only detect filesystems

Sascha Hauer s.hauer at pengutronix.de
Tue Mar 18 07:41:45 PDT 2025


cdev_detect_type() is only used by the fs code to determine the
filesystem type on a cdev, so it only needs to be able to detect
filesystems and no other types. Call file_detect_fs_type() instead
for smaller binary size.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/filetype.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/filetype.c b/common/filetype.c
index 1e2d4ed0e3..b8d65dfb9f 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -523,7 +523,7 @@ int cdev_detect_type(struct cdev *cdev, enum filetype *type)
 	if (ret < 0)
 		goto err_out;
 
-	*type = file_detect_type(buf, ret);
+	*type = file_detect_fs_type(buf, ret);
 	ret = 0;
 
 err_out:

-- 
2.39.5




More information about the barebox mailing list