summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_conf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 6ca948d..1a3eaea 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -727,7 +727,7 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, dev_t *dp, u_i
* the end of the list.
*/
unit = *up;
- low = 0;
+ low = extra;
de = dl = NULL;
cd = *cdp;
LIST_FOREACH(dev, &cd->head, si_clone) {
@@ -741,14 +741,14 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, dev_t *dp, u_i
de = dev;
continue;
}
- if (u > unit) {
+ if (u > (unit | extra)) {
dl = dev;
break;
}
de = dev;
}
if (unit == -1)
- unit = low;
+ unit = low & CLONE_UNITMASK;
dev = makedev(csw->d_maj, unit2minor(unit | extra));
KASSERT(!(dev->si_flags & SI_CLONELIST),
("Dev %p should not be on clonelist", dev));
OpenPOWER on IntegriCloud