Remove the root device from the root devices list.
The device is added to the root devices list when initializing, but was not removed from there again when the root device was removed and freed, causing the list to have a stale entry. Probably fixes #3305. The list is populated once for the _fbsd_init_hardware iteration and, if a device was found, again for _fbsd_init_drivers. The only thing I don't understand is why it didn't just always crash, as there should have been a stale list entry in any case when a supported device actually was found...
This commit is contained in:
parent
4495409499
commit
b39f919dbf
@ -362,6 +362,8 @@ device_delete_child(device_t parent, device_t child)
|
||||
|
||||
if (parent != NULL)
|
||||
list_remove_item(&parent->children, child);
|
||||
else
|
||||
list_remove_item(&sRootDevices, child);
|
||||
|
||||
// We differentiate from the FreeBSD logic here - it will first delete
|
||||
// the children, and will then detach the device.
|
||||
|
Loading…
Reference in New Issue
Block a user