xref: /freebsd/share/man/man9/BUS_CHILD_LOCATION.9 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1.\"
2.\" Copyright (c) 2021 Netflix, Inc.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
14.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
17.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23.\"
24.Dd April 22, 2021
25.Dt BUS_CHILD_LOCATION 9
26.Os
27.Sh NAME
28.Nm BUS_CHILD_LOCATION
29.Nd "obtain the location of a child on the bus."
30.Sh SYNOPSIS
31.In sys/param.h
32.In sys/bus.h
33.In sys/sbuf.h
34.Ft void
35.Fn BUS_CHILD_LOCATION "device_t dev" "device_t child" "struct sbuf *sb"
36.Sh DESCRIPTION
37The
38.Fn BUS_CHILD_LOCATION
39method returns the location of the
40.Dv child
41device.
42This location is a series of key=value pairs.
43The string must be formatted as a space-separated list of key=value pairs.
44Names may only contain alphanumeric characters, underscores ('_') and hyphens ('-').
45Values can contain any non-whitespace characters.
46Values containing whitespace can be quoted with double quotes ('"').
47Double quotes and backslashes in quoted values can be escaped with backslashes ('\').
48.Pp
49The location is defined as a series of characteristics of the
50.Dv child
51device that can be used to locate that device independent of what drivers are
52attached.
53Typically, these are slot numbers, bus addresses, or some topology formation.
54Where possible, buses are encouraged to provide locations that are stable from
55boot to boot and when other devices are added or removed.
56A location is not dependent on the kind of device at that location.
57.Sh SEE ALSO
58.Xr bus 9 ,
59.Xr device 9
60