tail head cat sleep
QR code linking to this page

Manual Pages  — BUS_GENERIC_PRINT_CHILD

NAME

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

CONTENTS

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 "amp; 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 "amp; on" followed by the parent device's name and unit ( "amp; 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.

BUS_GENERIC_PRINT_CHILD (9) February 5, 2025

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

The ā€œNā€ in NFS stands for Not, or Need, or perhaps Nightmare
— Harry Spencer