XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
linux
kmod.h
Go to the documentation of this file.
1
#ifndef __LINUX_KMOD_H__
2
#define __LINUX_KMOD_H__
3
4
#include <
linux/errno.h
>
/* ENOSYS, the only answer available */
5
6
/*
7
* DCL <linux/kmod.h> -- request_module(), the call that means "the code for
8
* this is not in the image; go and fetch it".
9
*
10
* The body is a static inline returning -ENOSYS because that is literally
11
* what happens: DCL/module_loader.c runs the initcalls baked into the kernel
12
* image and has no module directory, no symbol resolution against a file on
13
* disk, and no way to interpret a format string like "tty-ldisc-%d" as a
14
* request for anything. It has to be a *definition* and not a declaration
15
* precisely so that this header, included by tty_ldisc.c:4, is all it takes
16
* for the call at tty_ldisc.c:154 to link -- a declaration would have moved
17
* the failure from compile time to link time and named it something else.
18
*
19
* The return value is ignored at the only call site, and the caller retries
20
* get_ldops() straight afterwards and takes whatever that says, so -ENOSYS
21
* never reaches a user: the observable behaviour is "no such discipline",
22
* which is the truth.
23
*
24
* __request_module()/try_then_request_module() are not provided -- nothing
25
* staged spells them, and a macro that swallowed a call would hide exactly
26
* the search that does not happen here.
27
*
28
* upstream include/linux/kmod.h, __request_module() in kernel/module/main.c
29
*/
30
static
inline
int
request_module(
const
char
*
fmt
, ...)
31
{
32
(void)
fmt
;
33
return
-
ENOSYS
;
34
}
35
36
#endif
/* __LINUX_KMOD_H__ */
errno.h
fmt
const char * fmt
Definition
drm_file.h:466
ENOSYS
#define ENOSYS
Definition
kernel.h:310
Generated by
1.9.8