From f84ee0ff00e98a6b1d53df99506716f23af2fd99 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 15 Dec 2000 17:55:24 +0000 Subject: Don't clone impossible unit numbers for disks. --- sys/kern/subr_disk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/subr_disk.c') diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 0b98fea394d3..baf2cdaecd70 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -55,6 +55,8 @@ disk_clone(void *arg, char *name, int namelen, dev_t *dev) u *= 10; u += name[i++] - '0'; } + if (u > DKMAXUNIT) + continue; p = RAW_PART; s = WHOLE_DISK_SLICE; pdev = makedev(dp->d_devsw->d_maj, dkmakeminor(u, s, p)); -- cgit v1.2.3