mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:32:43 +00:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			1,016 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			1,016 B
		
	
	
	
	
	
	
	
Name
module_load - load a kernel module
Synopsis
#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
- EPERM: The calling process does not have superuser permissions.
- EFAULT:- pathpointed 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- .textsection, or didn't export a- module_initfunction.
- EEXIST: A module with the same name was already loaded.
