Enforce and respect the 8 unit limit.

This commit is contained in:
Poul-Henning Kamp 2000-04-23 09:10:09 +00:00
parent b81eb9cfd6
commit e2463c20b3

View File

@ -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 */