xref: /csrg-svn/lib/libc/gen/devname.3 (revision 69121)
161111Sbostic.\" Copyright (c) 1993
261111Sbostic.\"	The Regents of the University of California.  All rights reserved.
361060Smckusick.\"
461060Smckusick.\" %sccs.include.redist.man%
561060Smckusick.\"
6*69121Sbostic.\"     @(#)devname.3	8.2 (Berkeley) 04/29/95
761060Smckusick.\"
861060Smckusick.Dd
961060Smckusick.Dt DEVNAME 3
1061060Smckusick.Os BSD 4.4
1161060Smckusick.Sh NAME
1261060Smckusick.Nm devname
1361060Smckusick.Nd get device name
1461060Smckusick.Sh SYNOPSIS
1561060Smckusick.Fd #include <stdlib.h>
1661060Smckusick.Ft char *
1761060Smckusick.Fn devname "dev_t dev" "mode_t type"
1861060Smckusick.Sh DESCRIPTION
1961060SmckusickThe
2061060Smckusick.Fn devname
2161060Smckusickfunction returns a pointer to the name of the block or character
2261060Smckusickdevice in
2361060Smckusick.Dq Pa /dev
2461060Smckusickwith a device number of
2561060Smckusick.Fa dev ,
2661060Smckusickand a file type matching the one encoded in
2761060Smckusick.Fa type
2861060Smckusickwhich must be one of S_IFBLK or S_IFCHR.
2961060SmckusickIf no device matches the specified values, or no information is
30*69121Sbosticavailable, NULL is returned.
31*69121Sbostic.Pp
32*69121SbosticThe traditional display for applications when no device is
33*69121Sbosticfound is the string
34*69121Sbostic.Dq ?? .
3561060Smckusick.Sh SEE ALSO
3661060Smckusick.Xr stat 2 ,
3761060Smckusick.Xr dev_mkdb 8
3861060Smckusick.Sh HISTORY
3961060SmckusickThe
4061060Smckusick.Nm devname
4161060Smckusickfunction call appeared in
4261060Smckusick.Bx 4.4 .
43