diff options
author | root <root@zombrain.(none)> | 2011-07-25 08:54:41 (GMT) |
---|---|---|
committer | root <root@zombrain.(none)> | 2011-07-25 08:54:41 (GMT) |
commit | ab4fcaad149d4bdccefa8f693c2a8e044b40dd4c (patch) | |
tree | c95c280caabc70e7aedbde723e38820047357be7 /hw/xfree86/os-support/bsd/bsd_kmod.c |
initial state (xorg-server 1.10.2)
Diffstat (limited to 'hw/xfree86/os-support/bsd/bsd_kmod.c')
-rw-r--r-- | hw/xfree86/os-support/bsd/bsd_kmod.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/hw/xfree86/os-support/bsd/bsd_kmod.c b/hw/xfree86/os-support/bsd/bsd_kmod.c new file mode 100644 index 0000000..34e4341 --- /dev/null +++ b/hw/xfree86/os-support/bsd/bsd_kmod.c @@ -0,0 +1,28 @@ +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> +#include <sys/param.h> +#include <sys/linker.h> + +#include "xf86_OSproc.h" + +/* + * Load a FreeBSD kernel module. + * This is used by the DRI/DRM to load a DRM kernel module when + * the X server starts. It could be used for other purposes in the future. + * Input: + * modName - name of the kernel module (Ex: "tdfx") + * Return: + * 0 for failure, 1 for success + */ +int xf86LoadKernelModule(const char *modName) +{ + if (kldload(modName) != -1) + return 1; + else + return 0; +} |