BUS_GENERIC_PRINT_CHILD(9)

NAME
bus_generic_print_child, bus_print_child_domain, bus_print_child_footer, bus_print_child_header - generic implementation of BUS_PRINT_CHILD(9)

SYNOPSIS
#include <sys/param.h>
#include <sys/bus.h>
int
bus_generic_print_child(device_t dev, device_t child);
int
bus_print_child_domain(device_t dev, device_t child);
int
bus_print_child_footer(device_t dev, device_t child);
int
bus_print_child_header(device_t dev, device_t child);

DESCRIPTION
bus_generic_print_child() prints out the default device announcement message. Given device ‘foo0’ on bus ‘bar0’ where foo0 has the description “FooCard 1234” and is associated with the NUMA domain 1, the following would be printed:

    foo0: <FooCard 1234> numa-domain 1 on bar0

bus_generic_print_child() calls the three helper functions bus_print_child_header(), bus_print_child_domain(), and bus_print_child_footer().

bus_print_child_header() outputs the device name and unit followed by the device description in angle brackets ( “foo0: <FooCard 1234>”).

bus_print_child_domain() outputs “numa-domain” followed by the domain number if bus_get_domain() returns a valid domain for the device ( “numa-domain 1”). If dev is not associated witha valid domain, nothing is output.

bus_print_child_footer() outputs the string “on” followed by the parent device's name and unit ( “on bar0”).

These functions can be used to implement BUS_PRINT_CHILD(9) in a bus driver if bus_generic_print_child() is not sufficient.

RETURN VALUES
The number of characters output.

SEE ALSO
BUS_PRINT_CHILD(9), device(9)

AUTHORS
This manual page was written by Doug Rabson.