Commit | Line | Data |
---|---|---|
a09e091a JB |
1 | #ifdef HAVE_XORG_CONFIG_H |
2 | #include <xorg-config.h> | |
3 | #endif | |
4 | ||
5 | #include <errno.h> | |
6 | #include <fcntl.h> | |
7 | #include <unistd.h> | |
8 | #include <sys/param.h> | |
9 | #include <sys/linker.h> | |
10 | ||
11 | #include "xf86_OSproc.h" | |
12 | ||
13 | /* | |
14 | * Load a FreeBSD kernel module. | |
15 | * This is used by the DRI/DRM to load a DRM kernel module when | |
16 | * the X server starts. It could be used for other purposes in the future. | |
17 | * Input: | |
18 | * modName - name of the kernel module (Ex: "tdfx") | |
19 | * Return: | |
20 | * 0 for failure, 1 for success | |
21 | */ | |
22 | int | |
23 | xf86LoadKernelModule(const char *modName) | |
24 | { | |
25 | if (kldload(modName) != -1) | |
26 | return 1; | |
27 | else | |
28 | return 0; | |
29 | } |