lang: core: os: Add a modinfo function

Not sure if this will need renaming, but might be a useful family of
functions.
This commit is contained in:
James Shubin
2025-06-05 21:40:19 -04:00
parent 499b8f2732
commit 3b88ad3794
4 changed files with 226 additions and 0 deletions

11
examples/lang/modinfo.mcl Normal file
View File

@@ -0,0 +1,11 @@
import "os"
$s = if os.modinfo_loaded("r8169") { # buggy module
"you might have a buggy network card module"
} else {
"you aren't using r8169"
}
print "modinfo" {
msg => $s,
}