mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Make sure the clone lists are sorted in the right order.
Explosion triggered by: pjd MFC: 3 days
This commit is contained in:
parent
1f8f09b081
commit
7bbb3a2690
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150793
|
@ -824,8 +824,10 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev **
|
|||
low++;
|
||||
de = dev;
|
||||
continue;
|
||||
}
|
||||
if (u > (unit | extra)) {
|
||||
} else if (u < (unit | extra)) {
|
||||
de = dev;
|
||||
continue;
|
||||
} else if (u > (unit | extra)) {
|
||||
dl = dev;
|
||||
break;
|
||||
}
|
||||
|
@ -835,7 +837,7 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev **
|
|||
dev = newdev(csw, unit2minor(unit | extra), ndev);
|
||||
if (dev->si_flags & SI_CLONELIST) {
|
||||
printf("dev %p (%s) is on clonelist\n", dev, dev->si_name);
|
||||
printf("unit=%d\n", unit);
|
||||
printf("unit=%d, low=%d, extra=0x%x\n", unit, low, extra);
|
||||
LIST_FOREACH(dev, &cd->head, si_clone) {
|
||||
printf("\t%p %s\n", dev, dev->si_name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue