Update to reflect reality; devname(3) hasn't returned NULL on failure
since revision 1.2 of devname.c (1999/07/18). While I'm here, note, in the BUGS section, that the returned pointer is to a static buffer.
This commit is contained in:
parent
3ac7f11229
commit
f04938aa8e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user