mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Bring the implementation of the pnpinfo string function more in
line with the rest of this file.
This commit is contained in:
parent
f27d082cdf
commit
45091a0b8c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190113
@ -68,8 +68,7 @@ static device_probe_t ofw_pcibus_probe;
|
||||
static device_attach_t ofw_pcibus_attach;
|
||||
static pci_assign_interrupt_t ofw_pcibus_assign_interrupt;
|
||||
static ofw_bus_get_devinfo_t ofw_pcibus_get_devinfo;
|
||||
static int ofw_pcibus_child_pnpinfo_str_method(device_t cbdev, device_t child,
|
||||
char *buf, size_t buflen);
|
||||
static bus_child_pnpinfo_str_t ofw_pcibus_pnpinfo_str;
|
||||
|
||||
static device_method_t ofw_pcibus_methods[] = {
|
||||
/* Device interface */
|
||||
@ -77,7 +76,7 @@ static device_method_t ofw_pcibus_methods[] = {
|
||||
DEVMETHOD(device_attach, ofw_pcibus_attach),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_child_pnpinfo_str, ofw_pcibus_child_pnpinfo_str_method),
|
||||
DEVMETHOD(bus_child_pnpinfo_str, ofw_pcibus_pnpinfo_str),
|
||||
|
||||
/* PCI interface */
|
||||
DEVMETHOD(pci_assign_interrupt, ofw_pcibus_assign_interrupt),
|
||||
@ -306,16 +305,15 @@ ofw_pcibus_get_devinfo(device_t bus, device_t dev)
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pcibus_child_pnpinfo_str_method(device_t cbdev, device_t child, char *buf,
|
||||
ofw_pcibus_pnpinfo_str(device_t dev, device_t child, char *buf,
|
||||
size_t buflen)
|
||||
{
|
||||
pci_child_pnpinfo_str_method(cbdev, child, buf, buflen);
|
||||
|
||||
pci_child_pnpinfo_str_method(dev, child, buf, buflen);
|
||||
if (ofw_bus_get_node(child) != -1) {
|
||||
strlcat(buf, " ", buflen); /* Separate info */
|
||||
ofw_bus_gen_child_pnpinfo_str(cbdev, child, buf, buflen);
|
||||
strlcat(buf, " ", buflen); /* Separate info. */
|
||||
ofw_bus_gen_child_pnpinfo_str(dev, child, buf, buflen);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user