diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-11-28 23:33:10 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-11-28 23:33:10 +0000 |
commit | 22d35c6b496718de60c740eab6f843bb546513b3 (patch) | |
tree | 766206f156d7508bb8ca05d72b64b008be886abc /sys/arch/amiga/amiga/conf.c | |
parent | 1c7998136960f5cd78adc56dff1c8f9352da3445 (diff) |
Adaption to new bus.h from NetBSD. Various driver has been updated to
NetBSD 961107 state. Other has not, partly because sometimes the bus.h
changes was coupled with other changes.
Diffstat (limited to 'sys/arch/amiga/amiga/conf.c')
-rw-r--r-- | sys/arch/amiga/amiga/conf.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/arch/amiga/amiga/conf.c b/sys/arch/amiga/amiga/conf.c index 24fcee2a673..d21206853c0 100644 --- a/sys/arch/amiga/amiga/conf.c +++ b/sys/arch/amiga/amiga/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.14 1996/10/19 13:26:03 mickey Exp $ */ +/* $OpenBSD: conf.c,v 1.15 1996/11/28 23:33:02 niklas Exp $ */ /* $NetBSD: conf.c,v 1.36 1996/05/19 21:04:18 veego Exp $ */ /*- @@ -274,6 +274,24 @@ chrtoblk(dev) } /* + * 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(chrtoblktab)/sizeof(chrtoblktab[0]); i++) + if (blkmaj == chrtoblktab[i]) + return (makedev(i, minor(dev))); + return (NODEV); +} + +/* * This entire table could be autoconfig()ed but that would mean that * the kernel's idea of the console would be out of sync with that of * the standalone boot. I think it best that they both use the same |