xref: /freebsd/share/man/man9/BUS_CHILD_LOCATION.9 (revision 43a5ec4eb41567cc92586503212743d89686d78f)
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.\" $FreeBSD$
25.\"
26.Dd April 22, 2021
27.Dt BUS_CHILD_LOCATION 9
28.Os
29.Sh NAME
30.Nm BUS_CHILD_LOCATION
31.Nd "obtain the location of a child on the bus."
32.Sh SYNOPSIS
33.In sys/param.h
34.In sys/bus.h
35.In sys/sbuf.h
36.Ft void
37.Fn BUS_CHILD_LOCATION "device_t dev" "device_t child" "struct sbuf *sb"
38.Sh DESCRIPTION
39The
40.Fn BUS_CHILD_LOCATION
41method returns the location of the
42.Dv child
43device.
44This location is a series of key=value pairs.
45The string must be formatted as a space-separated list of key=value pairs.
46Names may only contain alphanumeric characters, underscores ('_') and hyphens ('-').
47Values can contain any non-whitespace characters.
48Values containing whitespace can be quoted with double quotes ('"').
49Double quotes and backslashes in quoted values can be escaped with backslashes ('\').
50.Pp
51The location is defined as a series of characteristics of the
52.Dv child
53device that can be used to locate that device independent of what drivers are
54attached.
55Typically, these are slot numbers, bus addresses, or some topology formation.
56Where possible, buses are encouraged to provide locations that are stable from
57boot to boot and when other devices are added or removed.
58A location is not dependent on the kind of device at that location.
59.Sh SEE ALSO
60.Xr bus 9 ,
61.Xr device 9
62