diff options
-rw-r--r-- | sys/arch/mvme68k/mvme68k/conf.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c index 18954a24b8d..baf50c1365f 100644 --- a/sys/arch/mvme68k/mvme68k/conf.c +++ b/sys/arch/mvme68k/mvme68k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.10 1996/10/19 13:26:09 mickey Exp $ */ +/* $OpenBSD: conf.c,v 1.11 1996/11/06 01:45:18 deraadt Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -334,6 +334,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(chrtoblktbl)/sizeof(chrtoblktbl[0]); i++) + if (blkmaj == chrtoblktbl[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 |