mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-03 03:41:49 +00:00
When we are picking the next available unit number, specifically say
what we picked. Otherwise it is anybody's guess as to where the device ended up.
This commit is contained in:
parent
71582bf515
commit
58da4602af
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65456
1 changed files with 3 additions and 3 deletions
|
@ -357,12 +357,12 @@ devclass_alloc_unit(devclass_t dc, int *unitp)
|
|||
/* If we have been given a wired unit number, check for existing device */
|
||||
if (unit != -1) {
|
||||
if (unit >= 0 && unit < dc->maxunit && dc->devices[unit] != NULL) {
|
||||
if (bootverbose)
|
||||
printf("%s-: %s%d exists, using next available unit number\n",
|
||||
dc->name, dc->name, unit);
|
||||
/* find the next available slot */
|
||||
while (++unit < dc->maxunit && dc->devices[unit] != NULL)
|
||||
;
|
||||
if (bootverbose)
|
||||
printf("%s-: %s%d already exists, using %s%d instead\n",
|
||||
dc->name, dc->name, *unitp, dc->name, unit);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue