xref: /freebsd/share/man/man9/device_get_children.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1fa930a73SNick Hibma.\" -*- nroff -*-
2fa930a73SNick Hibma.\"
3fa930a73SNick Hibma.\" Copyright (c) 1998 Doug Rabson
4fa930a73SNick Hibma.\"
5fa930a73SNick Hibma.\" All rights reserved.
6fa930a73SNick Hibma.\"
7fa930a73SNick Hibma.\" This program is free software.
8fa930a73SNick Hibma.\"
9fa930a73SNick Hibma.\" Redistribution and use in source and binary forms, with or without
10fa930a73SNick Hibma.\" modification, are permitted provided that the following conditions
11fa930a73SNick Hibma.\" are met:
12fa930a73SNick Hibma.\" 1. Redistributions of source code must retain the above copyright
13fa930a73SNick Hibma.\"    notice, this list of conditions and the following disclaimer.
14fa930a73SNick Hibma.\" 2. Redistributions in binary form must reproduce the above copyright
15fa930a73SNick Hibma.\"    notice, this list of conditions and the following disclaimer in the
16fa930a73SNick Hibma.\"    documentation and/or other materials provided with the distribution.
17fa930a73SNick Hibma.\"
18fa930a73SNick Hibma.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19fa930a73SNick Hibma.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20fa930a73SNick Hibma.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21fa930a73SNick Hibma.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22fa930a73SNick Hibma.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23fa930a73SNick Hibma.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24fa930a73SNick Hibma.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25fa930a73SNick Hibma.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26fa930a73SNick Hibma.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27fa930a73SNick Hibma.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28fa930a73SNick Hibma.\"
29632ed478SWarner Losh.Dd August 23, 2008
30fa930a73SNick Hibma.Dt DEVICE_GET_CHILDREN 9
313d45e180SRuslan Ermilov.Os
32fa930a73SNick Hibma.Sh NAME
33fa930a73SNick Hibma.Nm device_get_children
34fa930a73SNick Hibma.Nd get a list of devices connected to a device
35fa930a73SNick Hibma.Sh SYNOPSIS
3632eef9aeSRuslan Ermilov.In sys/param.h
3732eef9aeSRuslan Ermilov.In sys/bus.h
38fa930a73SNick Hibma.Ft int
39fa930a73SNick Hibma.Fn device_get_children "device_t dev" "device_t **devlistp" "int *devcountp"
40fa930a73SNick Hibma.Sh DESCRIPTION
41fa930a73SNick HibmaRetrieve a list of all device instances currently connected to
42fa930a73SNick Hibma.Pa dev
43fa930a73SNick Hibmaand return the list in
44fa930a73SNick Hibma.Fa *devlistp
45fa930a73SNick Hibmaand the count in
46fa930a73SNick Hibma.Fa *devcountp .
47fa930a73SNick HibmaThe memory allocated for the list should be freed using
48fa930a73SNick Hibma.Fn free "*devlistp" "M_TEMP" .
49632ed478SWarner Losh.Fa devlistp
50632ed478SWarner Loshand
51632ed478SWarner Losh.Fa devcountp
52632ed478SWarner Loshare not changed when an error is returned.
53fa930a73SNick Hibma.Sh RETURN VALUES
54fa930a73SNick HibmaZero is returned on success, otherwise an appropriate error is returned.
55fa930a73SNick Hibma.Sh SEE ALSO
56fa930a73SNick Hibma.Xr devclass 9 ,
57fa930a73SNick Hibma.Xr device 9
58fa930a73SNick Hibma.Sh AUTHORS
5909356c84SHiten PandyaThis manual page was written by
60fa930a73SNick Hibma.An Doug Rabson .
61