Better nomatch messages: include compat string. Also, flag devices as

disabled in the successful probe message, but leave what that means to
the actual driver (no semantic changes).
This commit is contained in:
Warner Losh 2014-02-12 04:56:34 +00:00
parent 4edef187b8
commit cca7539760
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261791

View file

@ -401,18 +401,24 @@ simplebus_print_res(struct simplebus_devinfo *di)
static void
simplebus_probe_nomatch(device_t bus, device_t child)
{
const char *name, *type;
const char *name, *type, *compat;
if (!bootverbose)
return;
name = ofw_bus_get_name(child);
type = ofw_bus_get_type(child);
compat = ofw_bus_get_compat(child);
device_printf(bus, "<%s>", name != NULL ? name : "unknown");
simplebus_print_res(device_get_ivars(child));
printf(" type %s (no driver attached)\n",
type != NULL ? type : "unknown");
if (!ofw_bus_status_okay(child))
printf(" disabled");
if (type)
printf(" type %s", type);
if (compat)
printf(" compat %s", compat);
printf(" (no driver attached)\n");
}
static int
@ -422,7 +428,8 @@ simplebus_print_child(device_t bus, device_t child)
rv = bus_print_child_header(bus, child);
rv += simplebus_print_res(device_get_ivars(child));
if (!ofw_bus_status_okay(child))
rv += printf(" disabled");
rv += bus_print_child_footer(bus, child);
return (rv);
}