mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:08:14 +00:00
Base: Describe kernel modules, syscalls, and programs
This commit is contained in:
parent
efa7141d14
commit
033de7efe2
5 changed files with 181 additions and 0 deletions
35
Base/usr/share/man/man2/module_load.md
Normal file
35
Base/usr/share/man/man2/module_load.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
## Name
|
||||
|
||||
module\_load - load a kernel module
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <serenity.h>
|
||||
|
||||
int module_load(const char* path, size_t path_length);
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
`module_load()` will load a kernel module from an ELF object file given its
|
||||
path in the filesystem.
|
||||
|
||||
## Return value
|
||||
|
||||
If the module is successfully loaded, `module_load()` returns 0. Otherwise, it
|
||||
returns -1 and sets `errno` to describe the error.
|
||||
|
||||
## Errors
|
||||
|
||||
* `EFAULT`: `path` pointed to memory that was not accessible for the caller.
|
||||
* `ENOEXEC`: The specified file could not be parsed as an ELF object.
|
||||
* `ENOENT`: One or more symbols referred to by the module could not be resolved.
|
||||
* `EINVAL`: The module had no `.text` section, or didn't export a `module_init` function.
|
||||
* `EEXIST`: A module with the same name was already loaded.
|
||||
|
||||
## See also
|
||||
|
||||
* [`module_unload`(2)](module_unload.md)
|
||||
* [`modload`(1)](../man1/modload.md)
|
||||
* [`kernel_modules`(7)](../man7/kernel_modules.md)
|
31
Base/usr/share/man/man2/module_unload.md
Normal file
31
Base/usr/share/man/man2/module_unload.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
## Name
|
||||
|
||||
module\_unload - unload a kernel module
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <serenity.h>
|
||||
|
||||
int module_unload(const char* name, size_t name_length);
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
`module_unload()` will unload a kernel module by name.
|
||||
|
||||
## Return value
|
||||
|
||||
If the module is successfully unloaded, `module_unload()` returns 0.
|
||||
Otherwise, it returns -1 and sets `errno` to describe the error.
|
||||
|
||||
## Errors
|
||||
|
||||
* `EFAULT`: `path` pointed to memory that was not accessible for the caller.
|
||||
* `ENOENT`: There was no module loaded with the specified name.
|
||||
|
||||
## See also
|
||||
|
||||
* [`module_load`(2)](module_load.md)
|
||||
* [`modunload`(1)](../man1/modunload.md)
|
||||
* [`kernel_modules`(7)](../man7/kernel_modules.md)
|
Loading…
Add table
Add a link
Reference in a new issue