summaryrefslogtreecommitdiffstats
path: root/sys/scsi/uk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/scsi/uk.c')
-rw-r--r--sys/scsi/uk.c44
1 files changed, 43 insertions, 1 deletions
diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c
index 0518612..ab1e6e1 100644
--- a/sys/scsi/uk.c
+++ b/sys/scsi/uk.c
@@ -2,7 +2,7 @@
* Driver for a device we can't identify.
* by Julian Elischer (julian@tfs.com)
*
- * $Id: uk.c,v 1.8 1995/03/04 20:51:08 dufault Exp $
+ * $Id: uk.c,v 1.9 1995/05/30 08:13:56 rgrimes Exp $
*
* If you find that you are adding any code to this file look closely
* at putting it in "scsi_driver.c" instead.
@@ -11,6 +11,15 @@
#include <sys/param.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
+#ifdef JREMOD
+#include <sys/conf.h>
+#include <sys/kernel.h>
+#ifdef DEVFS
+#include <sys/devfsext.h>
+#endif /*DEVFS*/
+#define CDEV_MAJOR 31
+#endif /*JREMOD*/
+
SCSI_DEVICE_ENTRIES(uk)
@@ -36,3 +45,36 @@ struct scsi_device uk_switch =
0,
0,
};
+
+#ifdef JREMOD
+struct cdevsw uk_cdevsw =
+ { ukopen, ukclose, noread, nowrite, /*31*/
+ ukioctl, nostop, nullreset, nodevtotty,/* unknown */
+ seltrue, nommap, NULL }; /* scsi */
+
+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;
+#ifdef DEVFS
+ {
+ int x;
+/* default for a simple device with no probe routine (usually delete this) */
+ x=devfs_add_devsw(
+/* path name devsw minor type uid gid perm*/
+ "/", "uk", major(dev), 0, DV_CHR, 0, 0, 0600);
+ }
+ }
+#endif
+}
+
+SYSINIT(ukdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,uk_drvinit,NULL)
+
+#endif /* JREMOD */
+
OpenPOWER on IntegriCloud