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:
11
examples/lang/modinfo.mcl
Normal file
11
examples/lang/modinfo.mcl
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user