1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/sys/scsi/uk.c

73 lines
1.3 KiB
C
Raw Normal View History

1995-05-30 08:16:23 +00:00
/*
* Driver for a device we can't identify.
1993-11-18 05:03:27 +00:00
* by Julian Elischer (julian@tfs.com)
*
1997-08-02 14:33:27 +00:00
* $Id: uk.c,v 1.17 1997/03/23 06:33:54 bde Exp $
*
* If you find that you are adding any code to this file look closely
* at putting it in "scsi_driver.c" instead.
1993-11-18 05:03:27 +00:00
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <scsi/scsiconf.h>
#include <scsi/scsi_driver.h>
1993-11-18 05:03:27 +00:00
static d_open_t ukopen;
static d_close_t ukclose;
static d_ioctl_t ukioctl;
#define CDEV_MAJOR 31
static struct cdevsw uk_cdevsw =
{ ukopen, ukclose, noread, nowrite, /*31*/
ukioctl, nostop, nullreset, nodevtotty,/* unknown */
seltrue, nommap, NULL, "uk" ,NULL, -1 };
SCSI_DEVICE_ENTRIES(uk)
1993-11-18 05:03:27 +00:00
struct scsi_device uk_switch =
{
NULL,
NULL,
NULL,
NULL,
"uk",
0,
{0, 0},
SDEV_ONCE_ONLY|SDEV_UK, /* Only one open allowed */
0,
"Unknown",
ukopen,
0,
T_UNKNOWN,
0,
0,
0,
0,
0,
0,
};
static uk_devsw_installed = 0;
static void uk_drvinit(void *unused)
{
dev_t dev;
if( ! uk_devsw_installed ) {
dev = makedev(CDEV_MAJOR, 0);
cdevsw_add(&dev,&uk_cdevsw, NULL);
uk_devsw_installed = 1;
}
}
SYSINIT(ukdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,uk_drvinit,NULL)