From bc9576a9987a403695ccd1e59c34c28add63772d Mon Sep 17 00:00:00 2001 From: Marc Andre Tanner Date: Tue, 1 Dec 2009 12:27:34 +0100 Subject: [PATCH] Fix parsing of /proc/filesystems We can't just ignore "nodev" entries. It just means that the filesystem is currently not mounted on a block device not that it can't be mounted on one. This has the effect that it now also scans the NAND jffs2 partition which is rather slow to mount. Signed-off-by: Marc Andre Tanner --- kexec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kexec.c b/kexec.c index 1628756..66a1f97 100644 --- a/kexec.c +++ b/kexec.c @@ -82,14 +82,12 @@ static Eina_List* get_kernel_filesystems_builtin() { Eina_List *fs = NULL; char line[32]; - + while (fgets(line, sizeof(line), f)) { - /* ignore lines starting with nodev */ - if (!strncmp(line, "nodev", sstrlen("nodev"))) - continue; + /* overwrite new line */ line[strlen(line) - 1] = '\0'; - /* skip tab with line + 1*/ - fs = eina_list_append(fs, strdup(line + 1)); + /* skip tab or "nodev\t" */ + fs = eina_list_append(fs, strdup(line + (line[0] == '\t' ? 1 : sstrlen("nodev\t")))); } fclose(f); -- 2.11.4.GIT