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