mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00

Kernel modules can now be unloaded via a syscall. They get a chance to run some code of course. Before deallocating them, we call their "module_fini" symbol.
15 lines
280 B
C++
15 lines
280 B
C++
#include <serenity.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
(void)argc;
|
|
(void)argv;
|
|
const char* name = "FIXME";
|
|
int rc = module_unload(name, strlen(name));
|
|
if (rc < 0) {
|
|
perror("module_unload");
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|