diff options
author | bde <bde@FreeBSD.org> | 1998-08-20 06:10:42 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-08-20 06:10:42 +0000 |
commit | 337322b7ecce778fb684f420ddf00f21708fbcb5 (patch) | |
tree | 5b2104a2b1ad8240a6f3350bdbb7251363deb9b9 /sys/scsi | |
parent | ea894121f18205b2b00bc3a7d8e2300e987ea796 (diff) | |
download | FreeBSD-src-337322b7ecce778fb684f420ddf00f21708fbcb5.zip FreeBSD-src-337322b7ecce778fb684f420ddf00f21708fbcb5.tar.gz |
Moved `nx' functions to the one place where they are used (su.c).
They shouldn't be used there either. They should have gone away
about 3 years ago when the statically initialized devswitches went
away, but su.c unfortunately still frobs the cdevswitch in the old
way.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/su.c | 85 |
1 files changed, 82 insertions, 3 deletions
diff --git a/sys/scsi/su.c b/sys/scsi/su.c index 587305a..785e831 100644 --- a/sys/scsi/su.c +++ b/sys/scsi/su.c @@ -44,7 +44,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: su.c,v 1.19 1998/06/07 17:12:54 dfr Exp $ + * $Id: su.c,v 1.20 1998/07/04 22:30:25 julian Exp $ * * Tabstops 4 * XXX devfs entries for this device should be handled by generic scsiconfig @@ -89,8 +89,20 @@ static struct cdevsw su_cdevsw = */ #define OLD_DEV(NEWDEV, OLDDEV) ((OLDDEV) | ((NEWDEV) & 0x080000FF)) -/* bnxio, cnxio: non existent device entries - */ +/* cnxio: non existent device entries. */ + +static d_open_t nxopen; +static d_close_t nxclose; +static d_read_t nxread; +static d_write_t nxwrite; +static d_ioctl_t nxioctl; +#define nxstop nostop /* one void return is as good as another */ +#define nxreset noreset /* one unused function is as good as another */ +#define nxdevtotty nodevtotty /* one NULL return is as good as another */ +#define nxmmap nommap /* one -1 return is as good as another */ +#define nxstrategy nostrategy /* one NULL value is as good as another */ +static d_dump_t nxdump; +#define nxpsize nopsize /* one NULL value is as good as another */ static struct cdevsw cnxio = { nxopen, @@ -263,6 +275,73 @@ supoll(dev_t dev, int events, struct proc *p) return (*devswp->d_poll)(base, events, p); } +static int +nxopen(dev, flags, fmt, p) + dev_t dev; + int flags; + int fmt; + struct proc *p; +{ + + return (ENXIO); +} + +static int +nxclose(dev, flags, fmt, p) + dev_t dev; + int flags; + int fmt; + struct proc *p; +{ + + printf("nxclose(0x%x) called\n", dev); + return (ENXIO); +} + +static int +nxread(dev, uio, ioflag) + dev_t dev; + struct uio *uio; + int ioflag; +{ + + printf("nxread(0x%x) called\n", dev); + return (ENXIO); +} + +static int +nxwrite(dev, uio, ioflag) + dev_t dev; + struct uio *uio; + int ioflag; +{ + + printf("nxwrite(0x%x) called\n", dev); + return (ENXIO); +} + +static int +nxioctl(dev, cmd, data, flags, p) + dev_t dev; + u_long cmd; + caddr_t data; + int flags; + struct proc *p; +{ + + printf("nxioctl(0x%x) called\n", dev); + return (ENXIO); +} + +static int +nxdump(dev) + dev_t dev; +{ + + printf("nxdump(0x%x) called\n", dev); + return (ENXIO); +} + static su_devsw_installed = 0; static void |