summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-11-29 15:44:09 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-11-29 16:29:44 +0100
commit8cf163db4ff9bc61334cd0c3ed53fabe13dd2587 (patch)
treecb2cea886e5498b0540ff7c775022a56c04b27dd
parenta0db6f292cdceec16b928fac8a777745c68a319f (diff)
downloaddrakx-8cf163db4ff9bc61334cd0c3ed53fabe13dd2587.tar
drakx-8cf163db4ff9bc61334cd0c3ed53fabe13dd2587.tar.gz
drakx-8cf163db4ff9bc61334cd0c3ed53fabe13dd2587.tar.bz2
drakx-8cf163db4ff9bc61334cd0c3ed53fabe13dd2587.tar.xz
drakx-8cf163db4ff9bc61334cd0c3ed53fabe13dd2587.zip
check for builtin modules in /sys/fs too
eg: ext4 is builtin but appears in /sys/fs, not in /sys/modules Alternatively we could have looked at /proc/filesytem contents like stage2 Thus we've better readable stage1 logs
-rw-r--r--mdk-stage1/NEWS1
-rw-r--r--mdk-stage1/modules.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS
index 746e8fe63..5cfc473c4 100644
--- a/mdk-stage1/NEWS
+++ b/mdk-stage1/NEWS
@@ -1,4 +1,5 @@
- advertize "ext4" rather than "ext2"
+- check for builtin modules in /sys/fs too (eg: ext4)
2.32
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c
index 5b470269e..76177302e 100644
--- a/mdk-stage1/modules.c
+++ b/mdk-stage1/modules.c
@@ -221,6 +221,12 @@ int module_already_present(const char * name)
answ = 1;
free(path);
}
+ if (!answ) {
+ asprintf(&path, "/sys/fs/%s", name);
+ if (!stat(path, &sb))
+ answ = 1;
+ free(path);
+ }
return answ;
}