mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:02:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			744 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			744 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ## 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
 | |
| 
 | |
| * `EPERM`: The calling process does not have superuser permissions.
 | |
| * `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`(8)](../man8/modunload.md)
 | |
| * [`kernel_modules`(7)](../man7/kernel_modules.md)
 | 
