diff options
| author | Dima Dorfman <dd@FreeBSD.org> | 2002-03-18 02:32:53 +0000 |
|---|---|---|
| committer | Dima Dorfman <dd@FreeBSD.org> | 2002-03-18 02:32:53 +0000 |
| commit | f04938aa8ec450549860e700a68d93ff726e5cc6 (patch) | |
| tree | e23ce9fce5e99f206814554ef44dbad0a642d9ba /lib/libc | |
| parent | 3ac7f112293cb0438587008b17403e9e9e19f95d (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/devname.3 | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/libc/gen/devname.3 b/lib/libc/gen/devname.3 index ccc60c5a191c..6904a897257b 100644 --- a/lib/libc/gen/devname.3 +++ b/lib/libc/gen/devname.3 @@ -56,12 +56,19 @@ with a device number of and a file type matching the one encoded in .Fa type which must be one of S_IFBLK or S_IFCHR. -If no device matches the specified values, or no information is -available, NULL is returned. -.Pp -The traditional display for applications when no device is -found is the string -.Dq ?? . +To find the right name, +.Fn devname +first searches the device database created by +.Xr dev_mkdb 8 ; +if that fails, it asks the kernel via the +.Va kern.devname +sysctl. +If it was still unable to come up with a suitable name, +it will format the information encapsulated in +.Fa dev +and +.Fa type +in a human-readable format. .Sh SEE ALSO .Xr stat 2 , .Xr dev_mkdb 8 @@ -70,3 +77,8 @@ The .Fn devname function call appeared in .Bx 4.4 . +.Sh BUGS +The +.Fn devname +function returns a poiner to an internal static object; +thus, subsequent calls will modify the same buffer. |
