*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: devname | Section: 3 | Source: NetBSD | File: devname.3
DEVNAME(3) FreeBSD Library Functions Manual DEVNAME(3) NAME devname, devname_r - get device name LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <stdlib.h> #include <sys/stat.h> char * devname(dev_t dev, mode_t type); int devname_r(dev_t dev, mode_t type, char *path, size_t len); DESCRIPTION The devname() function returns a pointer to the static buffer with the name of the block or character device in "/dev" with a device number of dev, and a file type matching the one encoded in 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. The devname_r() function is a reentrant and thread-safe version of devname(). This function returns the device name by copying it into the path argument with up to len characters. The path argument is always nul-terminated. The traditional display for applications when no device is found is the string "??". RETURN VALUES If successful, devname() returns a pointer to a nul-terminated string containing the name of the device. If an error occurs devname will return NULL. If successful, devname_r() places a nul-terminated string containing the name of the device in the buffer pointed to by path and returns 0. If an error occurs devname_r() will return an error number from <sys/errno.h> indicating what went wrong. FILES /var/run/dev.cdb Device database file. ERRORS The devname_r() function may fail if: [ENOENT] The corresponding device does not exist. [ERANGE] The passed buffer length is too short. SEE ALSO stat(2), dev_mkdb(8) HISTORY The devname function call appeared in 4.4BSD. The devname_r() function first appeared in NetBSD 6.0. FreeBSD 14.1-RELEASE-p8 September 9, 2017 FreeBSD 14.1-RELEASE-p8

Navigation Options