The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/scsi/uk.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Driver for a device we can't identify.
    3  * by Julian Elischer (julian@tfs.com)
    4  *
    5  * $FreeBSD: src/sys/scsi/uk.c,v 1.14.6.1 1999/09/05 08:21:54 peter Exp $
    6  *
    7  * If you find that you are adding any code to this file look closely
    8  * at putting it in "scsi_driver.c" instead.
    9  */
   10 
   11 #include <sys/param.h>
   12 #include <sys/systm.h>
   13 #include <sys/conf.h>
   14 #include <sys/kernel.h>
   15 #ifdef DEVFS
   16 #include <sys/devfsext.h>
   17 #endif /*DEVFS*/
   18 #include <scsi/scsi_all.h>
   19 #include <scsi/scsiconf.h>
   20 
   21 
   22 static  d_open_t        ukopen;
   23 static  d_close_t       ukclose;
   24 static  d_ioctl_t       ukioctl;
   25 
   26 #define CDEV_MAJOR 31
   27 static struct cdevsw uk_cdevsw = 
   28         { ukopen,       ukclose,        noread,         nowrite,        /*31*/
   29           ukioctl,      nostop,         nullreset,      nodevtotty,/* unknown */
   30           seltrue,      nommap,         NULL,   "uk"    ,NULL,  -1 };
   31 
   32 SCSI_DEVICE_ENTRIES(uk)
   33 
   34 struct scsi_device uk_switch =
   35 {
   36         NULL,
   37         NULL,
   38         NULL,
   39         NULL,
   40         "uk",
   41         0,
   42         {0, 0},
   43         SDEV_ONCE_ONLY|SDEV_UK, /* Only one open allowed */
   44         0,
   45         "Unknown",
   46         ukopen,
   47         0,
   48         T_UNKNOWN,
   49         0,
   50         0,
   51         0,
   52         0,
   53         0,
   54         0,
   55 };
   56 
   57 
   58 static uk_devsw_installed = 0;
   59 
   60 static void     uk_drvinit(void *unused)
   61 {
   62         dev_t dev;
   63 
   64         if( ! uk_devsw_installed ) {
   65                 dev = makedev(CDEV_MAJOR, 0);
   66                 cdevsw_add(&dev,&uk_cdevsw, NULL);
   67                 uk_devsw_installed = 1;
   68         }
   69 }
   70 
   71 SYSINIT(ukdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,uk_drvinit,NULL)
   72 
   73 

Cache object: a36ccdd8928f47c9db3048a1a877b0b1


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.