diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-05-28 23:18:00 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-05-28 23:18:00 +0000 |
commit | c2a3056c232ff0e40bdc6c96dfbe98f2e40ba96e (patch) | |
tree | 7d6041da4b801c8bbc200196f5744b001e8124f5 /sys/arch | |
parent | 801a36fa6622a3c0c98b1f8122e49c4c93c2b934 (diff) |
We use select, not poll. Correct ipl entry. Add blktochr func.
Comment out the cfl device for the time being, we miss some file for it.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/vax/conf.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index c572772a86b..41f34fa1d2c 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.11 1997/01/17 08:44:25 maja Exp $ */ +/* $OpenBSD: conf.c,v 1.12 1997/05/28 23:17:59 niklas Exp $ */ /* $NetBSD: conf.c,v 1.27 1997/01/07 11:35:20 mrg Exp $ */ /*- @@ -183,17 +183,17 @@ struct consdev constab[]={ /* Special for console storage */ #define dev_type_rw(n) int n __P((dev_t, int, int, struct proc *)) -/* plotters - open, close, write, ioctl, poll */ +/* plotters - open, close, write, ioctl, select */ #define cdev_plotter_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ - 0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev } + 0, dev_init(c,n,select), (dev_type_mmap((*))) enodev } /* console mass storage - open, close, read/write */ #define cdev_cnstore_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \ - (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \ + (dev_type_stop((*))) enodev, 0, (dev_type_select((*))) enodev, \ (dev_type_mmap((*))) enodev } #define cdev_lp_init(c,n) { \ @@ -205,13 +205,13 @@ struct consdev constab[]={ #define cdev_graph_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \ - 0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev } + 0, dev_init(c,n,select), (dev_type_mmap((*))) enodev } /* Ingres */ #define cdev_ingres_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \ (dev_type_write((*))) nullop, dev_init(c,n,ioctl), \ - (dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) nullop, \ + (dev_type_stop((*))) nullop, 0, (dev_type_select((*))) nullop, \ (dev_type_mmap((*))) enodev } @@ -279,6 +279,7 @@ cdev_decl(crl); #define crxwrite crxrw cdev_decl(crx); +#ifdef notyet #if VAX780 #define NCFL 1 #else @@ -287,6 +288,7 @@ cdev_decl(crx); #define cflread cflrw #define cflwrite cflrw cdev_decl(cfl); +#endif #include "dz.h" cdev_decl(dz); @@ -371,7 +373,11 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 5 */ cdev_plotter_init(NVP,vp), /* 6: Versatec plotter */ cdev_swap_init(1,sw), /* 7 */ +#ifdef notyet cdev_cnstore_init(NCFL,cfl), /* 8: 11/780 console floppy */ +#else + cdev_notdef(), /* 8 */ +#endif cdev_disk_init(NRA,ra), /* 9: MSCP disk interface */ cdev_plotter_init(NVA,va), /* 10: Benson-Varian plotter */ cdev_disk_init(NRK,rk), /* 11: RK06/07 */ @@ -405,7 +411,7 @@ struct cdevsw cdevsw[] = cdev_audio_init(NNP,np), /* 39: NP Intelligent Board */ cdev_graph_init(NQV,qv), /* 40: QVSS graphic display */ cdev_graph_init(NQD,qd), /* 41: QDSS graphic display */ - cdev_gen_init(NIPF,ipl), /* 42: ip filtering */ + cdev_gen_ipf(NIPF,ipl), /* 42: ip filtering */ cdev_ingres_init(NII,ii), /* 43: Ingres device */ cdev_notdef(), /* 44 was Datakit */ cdev_notdef(), /* 45 was Datakit */ @@ -546,3 +552,21 @@ iszerodev(dev) return (major(dev) == 3 && minor(dev) == 12); } + +/* + * Convert a character device number to a block device number. + */ +dev_t +blktochr(dev) + dev_t dev; +{ + int blkmaj = major(dev); + int i; + + if (blkmaj >= nblkdev) + return (NODEV); + for (i = 0; i < sizeof(chrtoblktbl)/sizeof(chrtoblktbl[0]); i++) + if (blkmaj == chrtoblktbl[i]) + return (makedev(i, minor(dev))); + return (NODEV); +} |