summaryrefslogtreecommitdiff
path: root/sys/arch/arc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-07 06:56:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-07 06:56:16 +0000
commit8a836816791cedf4b8b9c0387db0bbbffa977a86 (patch)
tree837cfa550b94a1b7830156e4a8434e148624271a /sys/arch/arc
parente4ca8552c1797108085b6d7f15e770c7686da261 (diff)
oops, i did not handle nchrdev correctly
Diffstat (limited to 'sys/arch/arc')
-rw-r--r--sys/arch/arc/arc/conf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/arc/arc/conf.c b/sys/arch/arc/arc/conf.c
index 7be82736197..4d51304eace 100644
--- a/sys/arch/arc/arc/conf.c
+++ b/sys/arch/arc/arc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.21 1998/07/07 03:02:32 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.22 1998/07/07 06:55:57 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 8.2 (Berkeley) 11/14/93
- * $Id: conf.c,v 1.21 1998/07/07 03:02:32 deraadt Exp $
+ * $Id: conf.c,v 1.22 1998/07/07 06:55:57 deraadt Exp $
*/
#include <sys/param.h>
@@ -256,8 +256,7 @@ iszerodev(dev)
}
-#define MAXDEV 57
-static int chrtoblktbl[MAXDEV] = {
+static int chrtoblktbl[] = {
/* VCHR */ /* VBLK */
/* 0 */ NODEV,
/* 1 */ NODEV,
@@ -293,7 +292,7 @@ chrtoblk(dev)
{
int blkmaj;
- if (major(dev) >= MAXDEV ||
+ if (major(dev) >= nchrdev ||
major(dev) > sizeof(chrtoblktbl)/sizeof(chrtoblktbl[0]))
return (NODEV);
blkmaj = chrtoblktbl[major(dev)];