xref: /original-bsd/lib/libc/gen/devname.3 (revision c3e32dec)
1.\" Copyright (c) 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)devname.3	8.1 (Berkeley) 06/04/93
7.\"
8.Dd
9.Dt DEVNAME 3
10.Os BSD 4.4
11.Sh NAME
12.Nm devname
13.Nd get device name
14.Sh SYNOPSIS
15.Fd #include <stdlib.h>
16.Ft char *
17.Fn devname "dev_t dev" "mode_t type"
18.Sh DESCRIPTION
19The
20.Fn devname
21function returns a pointer to the name of the block or character
22device in
23.Dq Pa /dev
24with a device number of
25.Fa dev ,
26and a file type matching the one encoded in
27.Fa type
28which must be one of S_IFBLK or S_IFCHR.
29If no device matches the specified values, or no information is
30available, the string
31.Dq ??
32is returned.
33.Sh SEE ALSO
34.Xr stat 2 ,
35.Xr dev_mkdb 8
36.Sh HISTORY
37The
38.Nm devname
39function call appeared in
40.Bx 4.4 .
41