Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/gehenna-devsw]: src/sys/dev/mscp Add the block/character device switches.
details: https://anonhg.NetBSD.org/src/rev/da47e4f7260e
branches: gehenna-devsw
changeset: 527090:da47e4f7260e
user: gehenna <gehenna%NetBSD.org@localhost>
date: Thu May 16 12:05:24 2002 +0000
description:
Add the block/character device switches.
Fix type of arguments.
diffstat:
sys/dev/mscp/mscp_tape.c | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diffs (79 lines):
diff -r a711d6fad2e4 -r da47e4f7260e sys/dev/mscp/mscp_tape.c
--- a/sys/dev/mscp/mscp_tape.c Thu May 16 12:03:21 2002 +0000
+++ b/sys/dev/mscp/mscp_tape.c Thu May 16 12:05:24 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_tape.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */
+/* $NetBSD: mscp_tape.c,v 1.16.8.1 2002/05/16 12:05:24 gehenna Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.16 2001/11/13 07:38:28 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.16.8.1 2002/05/16 12:05:24 gehenna Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -87,13 +87,6 @@
int mtgotstatus __P((struct device *, struct mscp *));
int mtioerror __P((struct device *, struct mscp *, struct buf *));
void mtfillin __P((struct buf *, struct mscp *));
-int mtopen __P((dev_t, int, int, struct proc *));
-int mtclose __P((dev_t, int, int, struct proc *));
-void mtstrategy __P((struct buf *));
-int mtread __P((dev_t, struct uio *));
-int mtwrite __P((dev_t, struct uio *));
-int mtioctl __P((dev_t, int, caddr_t, int, struct proc *));
-int mtdump __P((dev_t, daddr_t, caddr_t, size_t));
int mtcmd __P((struct mt_softc *, int, int, int));
void mtcmddone __P((struct device *, struct mscp *));
int mt_putonline __P((struct mt_softc *));
@@ -121,6 +114,23 @@
extern struct cfdriver mt_cd;
+dev_type_open(mtopen);
+dev_type_close(mtclose);
+dev_type_read(mtread);
+dev_type_write(mtwrite);
+dev_type_ioctl(mtioctl);
+dev_type_strategy(mtstrategy);
+dev_type_dump(mtdump);
+
+const struct bdevsw mt_bdevsw = {
+ mtopen, mtclose, mtstrategy, mtioctl, mtdump, nosize, D_TAP
+};
+
+const struct cdevsw mt_cdevsw = {
+ mtopen, mtclose, mtread, mtwrite, mtioctl,
+ nostop, notty, nopoll, nommap, D_TAPE
+};
+
/*
* More driver definitions, for generic MSCP code.
*/
@@ -278,18 +288,20 @@
}
int
-mtread(dev, uio)
+mtread(dev, uio, flag)
dev_t dev;
struct uio *uio;
+ int flag;
{
return (physio(mtstrategy, NULL, dev, B_READ, minphys, uio));
}
int
-mtwrite(dev, uio)
+mtwrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
+ int flag;
{
return (physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio));
Home |
Main Index |
Thread Index |
Old Index