First import
[xorg_rtime.git] / xorg-server-1.4 / hw / xfree86 / os-support / bsd / bsd_kmod.c
blobb6c75585205311cf9e2431f59cb0df4d5532566c
1 #ifdef HAVE_XORG_CONFIG_H
2 #include <xorg-config.h>
3 #endif
5 #include <errno.h>
6 #include <fcntl.h>
7 #include <unistd.h>
8 #include <sys/param.h>
9 #include <sys/linker.h>
11 #include "xf86_OSproc.h"
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
22 _X_EXPORT int xf86LoadKernelModule(const char *modName)
24 if (kldload(modName) != -1)
25 return 1;
26 else
27 return 0;