Skip to content

Commit

Permalink
bus: improve null_add_child() panic message
Browse files Browse the repository at this point in the history
When null_add_child() panics add the bus device name/unit and the new
unit as this will immediately reveal the parent missing the
  DEVMETHOD(bus_add_child, ...)
entry.

Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D48151
  • Loading branch information
Bjoern A. Zeeb authored and Bjoern A. Zeeb committed Dec 20, 2024
1 parent 5d09d10 commit 7030980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/kern/bus_if.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
int unit)
{

panic("bus_add_child is not implemented");
panic("%s: bus_add_child is not implemented, name '%s', "
"unit %d", device_get_nameunit(bus), name, unit);
}

static int
Expand Down

0 comments on commit 7030980

Please sign in to comment.