libfstools: add f2fs filesystem type and simplify fs type code
[project/fstools.git] / libfstools / find.c
index 9fd83c9d3396e04d4eb7572958e3e5b573cbe40e..72a2b4c70736adc482cb7d6a21225c241401b16c 100644 (file)
@@ -77,7 +77,7 @@ find_mount(char *mp)
 }
 
 char*
-find_mount_point(char *block, int mtd_only)
+find_mount_point(char *block, int root_only)
 {
        FILE *fp = fopen("/proc/mounts", "r");
        static char line[256];
@@ -100,10 +100,10 @@ find_mount_point(char *block, int mtd_only)
                        *t = '\0';
                        t++;
 
-                       if (mtd_only &&
+                       if (root_only &&
+                           strncmp(t, "f2fs", 4) &&
                            strncmp(t, "jffs2", 5) &&
-                           strncmp(t, "ubifs", 5) &&
-                           strncmp(t, "ext4", 4)) {
+                           strncmp(t, "ubifs", 5)) {
                                fclose(fp);
                                ULOG_ERR("block is mounted with wrong fs\n");
                                return NULL;