From: millert Date: Mon, 7 Apr 1997 06:23:10 +0000 (+0000) Subject: Use MAXPARTITIONS not ``8'' X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=13c87e969b90dde0d3b91997d564f6f6a46338da;p=openbsd Use MAXPARTITIONS not ``8'' --- diff --git a/sys/arch/alpha/stand/boot/disk.c b/sys/arch/alpha/stand/boot/disk.c index e29a2b2a116..05d1c348068 100644 --- a/sys/arch/alpha/stand/boot/disk.c +++ b/sys/arch/alpha/stand/boot/disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disk.c,v 1.5 1996/11/27 19:54:52 niklas Exp $ */ +/* $OpenBSD: disk.c,v 1.6 1997/04/07 06:23:10 millert Exp $ */ /* $NetBSD: disk.c,v 1.3 1995/11/23 02:39:40 cgd Exp $ */ /* @@ -106,12 +106,12 @@ diskopen(f, ctlr, unit, part) char *msg, buf[DEV_BSIZE], devname[32]; static struct disk_softc *sc; -if (sc != NULL) { - f->f_devdata = (void *)sc; - return 0; -} + if (sc != NULL) { + f->f_devdata = (void *)sc; + return 0; + } - if (unit >= 8 || part >= 8) + if (unit >= 8 || part >= MAXPARTITIONS) return (ENXIO); /* * XXX