1*61111Sbostic.\" Copyright (c) 1993 2*61111Sbostic.\" The Regents of the University of California. All rights reserved. 361060Smckusick.\" 461060Smckusick.\" %sccs.include.redist.man% 561060Smckusick.\" 6*61111Sbostic.\" @(#)devname.3 8.1 (Berkeley) 06/04/93 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 3061060Smckusickavailable, the string 3161060Smckusick.Dq ?? 3261060Smckusickis returned. 3361060Smckusick.Sh SEE ALSO 3461060Smckusick.Xr stat 2 , 3561060Smckusick.Xr dev_mkdb 8 3661060Smckusick.Sh HISTORY 3761060SmckusickThe 3861060Smckusick.Nm devname 3961060Smckusickfunction call appeared in 4061060Smckusick.Bx 4.4 . 41