Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/gehenna-devsw]: src/sys/dev/scsipi Add the character device switch.
details: https://anonhg.NetBSD.org/src/rev/e15d0a0b40d3
branches: gehenna-devsw
changeset: 527070:e15d0a0b40d3
user: gehenna <gehenna%NetBSD.org@localhost>
date: Thu May 16 11:38:52 2002 +0000
description:
Add the character device switch.
diffstat:
sys/dev/scsipi/ch.c | 15 +++++++++++++--
sys/dev/scsipi/if_se.c | 15 +++++++++++----
sys/dev/scsipi/scsiconf.c | 15 +++++++++++----
sys/dev/scsipi/ses.c | 15 ++++++++++-----
4 files changed, 45 insertions(+), 15 deletions(-)
diffs (154 lines):
diff -r 3bcb1bc9f268 -r e15d0a0b40d3 sys/dev/scsipi/ch.c
--- a/sys/dev/scsipi/ch.c Thu May 16 11:36:21 2002 +0000
+++ b/sys/dev/scsipi/ch.c Thu May 16 11:38:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ch.c,v 1.49 2002/05/06 13:43:57 bouyer Exp $ */
+/* $NetBSD: ch.c,v 1.49.2.1 2002/05/16 11:38:52 gehenna Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.49 2002/05/06 13:43:57 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.49.2.1 2002/05/16 11:38:52 gehenna Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -120,6 +120,17 @@
"", "", ""},
};
+dev_type_open(chopen);
+dev_type_close(chclose);
+dev_type_read(chread);
+dev_type_ioctl(chioctl);
+dev_type_poll(chpoll);
+
+const struct cdevsw ch_cdevsw = {
+ chopen, chclose, chread, nowrite, chioctl,
+ nostop, notty, chpoll, nommap,
+};
+
/* SCSI glue */
int ch_interpret_sense __P((struct scsipi_xfer *));
diff -r 3bcb1bc9f268 -r e15d0a0b40d3 sys/dev/scsipi/if_se.c
--- a/sys/dev/scsipi/if_se.c Thu May 16 11:36:21 2002 +0000
+++ b/sys/dev/scsipi/if_se.c Thu May 16 11:38:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_se.c,v 1.39 2001/11/15 09:48:16 lukem Exp $ */
+/* $NetBSD: if_se.c,v 1.39.8.1 2002/05/16 11:38:53 gehenna Exp $ */
/*
* Copyright (c) 1997 Ian W. Dall <ian.dall%dsto.defence.gov.au@localhost>
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.39 2001/11/15 09:48:16 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.39.8.1 2002/05/16 11:38:53 gehenna Exp $");
#include "opt_inet.h"
#include "opt_atalk.h"
@@ -206,8 +206,6 @@
int sc_enabled;
};
-cdev_decl(se);
-
static int sematch __P((struct device *, struct cfdata *, void *));
static void seattach __P((struct device *, struct device *, void *));
@@ -250,6 +248,15 @@
extern struct cfdriver se_cd;
+dev_type_open(seopen);
+dev_type_close(seclose);
+dev_type_ioctl(seioctl);
+
+const struct cdevsw se_cdevsw = {
+ seopen, seclose, noread, nowrite, seioctl,
+ nostop, notty, nopoll, nommap,
+};
+
const struct scsipi_periphsw se_switch = {
NULL, /* Use default error handler */
sestart, /* have a queue, served by this */
diff -r 3bcb1bc9f268 -r e15d0a0b40d3 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Thu May 16 11:36:21 2002 +0000
+++ b/sys/dev/scsipi/scsiconf.c Thu May 16 11:38:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.184 2002/05/15 11:43:22 bouyer Exp $ */
+/* $NetBSD: scsiconf.c,v 1.184.2.1 2002/05/16 11:38:53 gehenna Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.184 2002/05/15 11:43:22 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.184.2.1 2002/05/16 11:38:53 gehenna Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,11 +97,18 @@
extern struct cfdriver scsibus_cd;
+dev_type_open(scsibusopen);
+dev_type_close(scsibusclose);
+dev_type_ioctl(scsibusioctl);
+
+const struct cdevsw scsibus_cdevsw = {
+ scsibusopen, scsibusclose, noread, nowrite, scsibusioctl,
+ nostop, notty, nopoll, nommap,
+};
+
int scsibusprint __P((void *, const char *));
void scsibus_config_interrupts __P((struct device *));
-cdev_decl(scsibus);
-
const struct scsipi_bustype scsi_bustype = {
SCSIPI_BUSTYPE_SCSI,
scsi_scsipi_cmd,
diff -r 3bcb1bc9f268 -r e15d0a0b40d3 sys/dev/scsipi/ses.c
--- a/sys/dev/scsipi/ses.c Thu May 16 11:36:21 2002 +0000
+++ b/sys/dev/scsipi/ses.c Thu May 16 11:38:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ses.c,v 1.13 2001/11/15 09:48:18 lukem Exp $ */
+/* $NetBSD: ses.c,v 1.13.8.1 2002/05/16 11:38:53 gehenna Exp $ */
/*
* Copyright (C) 2000 National Aeronautics & Space Administration
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.13 2001/11/15 09:48:18 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.13.8.1 2002/05/16 11:38:53 gehenna Exp $");
#include "opt_scsi.h"
@@ -132,9 +132,14 @@
#define WRITE_BUFFER 0x3b
#define READ_BUFFER 0x3c
-int sesopen __P((dev_t, int, int, struct proc *));
-int sesclose __P((dev_t, int, int, struct proc *));
-int sesioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
+dev_type_open(sesopen);
+dev_type_close(sesclose);
+dev_type_ioctl(sesioctl);
+
+const struct cdevsw ses_cdevsw = {
+ sesopen, sesclose, noread, nowrite, sesioctl,
+ nostop, notty, nopoll, nommap,
+};
static int ses_runcmd __P((struct ses_softc *, char *, int, char *, int *));
static void ses_log __P((struct ses_softc *, const char *, ...))
Home |
Main Index |
Thread Index |
Old Index