"Fossies" - the Fresh Open Source Software Archive

Member "xorg-server-1.20.5/hw/xfree86/os-support/bsd/bsd_kmod.c" (30 May 2019, 609 Bytes) of package /linux/misc/xorg-server-1.20.5.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "bsd_kmod.c" see the Fossies "Dox" file reference documentation.

    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 }