summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-04-23 09:10:09 +0000
committerphk <phk@FreeBSD.org>2000-04-23 09:10:09 +0000
commit06ce96a42b8eb3a9b7a999a7b42f6cce509ad54e (patch)
tree487977d6784f7e502b6297aeac923cca71be9083 /sys/contrib/dev
parent55b576c0561749d89b8cdd0b4fc327ae313c2296 (diff)
downloadFreeBSD-src-06ce96a42b8eb3a9b7a999a7b42f6cce509ad54e.zip
FreeBSD-src-06ce96a42b8eb3a9b7a999a7b42f6cce509ad54e.tar.gz
Enforce and respect the 8 unit limit.
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r--sys/contrib/dev/fla/fla.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c
index baa7de0..59a1bf4 100644
--- a/sys/contrib/dev/fla/fla.c
+++ b/sys/contrib/dev/fla/fla.c
@@ -120,7 +120,7 @@ static struct fla_s {
struct devstat stats;
struct disk disk;
dev_t dev;
-} softc[NFLA];
+} softc[8];
static int
flaopen(dev_t dev, int flag, int fmt, struct proc *p)
@@ -263,6 +263,8 @@ flaprobe (device_t dev)
int i;
unit = device_get_unit(dev);
+ if (unit >= 8)
+ return (ENXIO);
sc = &softc[unit];
/* This is slightly ugly */
OpenPOWER on IntegriCloud