diff options
author | njl <njl@FreeBSD.org> | 2005-02-08 18:00:29 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-08 18:00:29 +0000 |
commit | 21180427d3fde15a1feaea08b7c49ba07bece76d (patch) | |
tree | eabb3eaa2bb422d1749b6ccc5da2ff8787ba0121 /share | |
parent | e90b04ef14b93b89e8bbedc0bb3c35add6bf90c0 (diff) | |
download | FreeBSD-src-21180427d3fde15a1feaea08b7c49ba07bece76d.zip FreeBSD-src-21180427d3fde15a1feaea08b7c49ba07bece76d.tar.gz |
Update device_find_child(9) to return the first matching child if unit
is set to -1.
Reviewed by: dfr, imp
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/device_find_child.9 | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/share/man/man9/device_find_child.9 b/share/man/man9/device_find_child.9 index 4dd6a2c..35b6c6c 100644 --- a/share/man/man9/device_find_child.9 +++ b/share/man/man9/device_find_child.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 1998 +.Dd February 8, 2005 .Dt DEVICE_FIND_CHILD 9 .Os .Sh NAME @@ -38,14 +38,21 @@ .In sys/param.h .In sys/bus.h .Ft device_t -.Fn device_find_child "device_t dev" "const char* name" "int unit" +.Fn device_find_child "device_t dev" "const char *classname" "int unit" .Sh DESCRIPTION This function looks for a specific child of .Dv dev . with the given -.Fa name +.Fa classname and .Fa unit . +If +.Fa unit +is -1, it returns the first child of +.Dv dev +with a matching +.Fa classname +(that is, the one with the lowest unit.) .Sh RETURN VALUES If it exists, the child device is returned, otherwise NULL. .Sh SEE ALSO |