xref: /freebsd/share/man/man9/device_get_children.9 (revision 632ed478b01f6ee5d4cb7ef9f48706bf5cada5cf)
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.\"
29fa930a73SNick Hibma.\" $FreeBSD$
30fa930a73SNick Hibma.\"
31632ed478SWarner Losh.Dd August 23, 2008
32fa930a73SNick Hibma.Dt DEVICE_GET_CHILDREN 9
333d45e180SRuslan Ermilov.Os
34fa930a73SNick Hibma.Sh NAME
35fa930a73SNick Hibma.Nm device_get_children
36fa930a73SNick Hibma.Nd get a list of devices connected to a device
37fa930a73SNick Hibma.Sh SYNOPSIS
3832eef9aeSRuslan Ermilov.In sys/param.h
3932eef9aeSRuslan Ermilov.In sys/bus.h
40fa930a73SNick Hibma.Ft int
41fa930a73SNick Hibma.Fn device_get_children "device_t dev" "device_t **devlistp" "int *devcountp"
42fa930a73SNick Hibma.Sh DESCRIPTION
43fa930a73SNick HibmaRetrieve a list of all device instances currently connected to
44fa930a73SNick Hibma.Pa dev
45fa930a73SNick Hibmaand return the list in
46fa930a73SNick Hibma.Fa *devlistp
47fa930a73SNick Hibmaand the count in
48fa930a73SNick Hibma.Fa *devcountp .
49fa930a73SNick HibmaThe memory allocated for the list should be freed using
50fa930a73SNick Hibma.Fn free "*devlistp" "M_TEMP" .
51632ed478SWarner Losh.Fa devlistp
52632ed478SWarner Loshand
53632ed478SWarner Losh.Fa devcountp
54632ed478SWarner Loshare not changed when an error is returned.
55fa930a73SNick Hibma.Sh RETURN VALUES
56fa930a73SNick HibmaZero is returned on success, otherwise an appropriate error is returned.
57fa930a73SNick Hibma.Sh SEE ALSO
58fa930a73SNick Hibma.Xr devclass 9 ,
59fa930a73SNick Hibma.Xr device 9
60fa930a73SNick Hibma.Sh AUTHORS
6109356c84SHiten PandyaThis manual page was written by
62fa930a73SNick Hibma.An Doug Rabson .
63