Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #78
Difficulty: Easy
Linux was inspired by MINIX
True or False?
Linux & Unix Commands - Search Man Pages

devnm(3) [hpux man page]

devnm(3)						     Library Functions Manual							  devnm(3)

devnm - map device ID to file path SYNOPSIS
Given a device type, a device ID, and a string in which to return the result, maps the type and ID to a block or character special file (device file) name by searching It returns in path the full path name of the first special file encountered with a matching device type and ID. It searches and all its subdirectories recursively in unspecified order. The parameters are: devtype One of the file type values or documented in stat(5). Bits other than those in the set are ignored. Hence the value can be, for example, an value returned by (see stat(2)). devid A device ID (the combined major and minor numbers) such as returned by in the or field. path Pointer to the buffer in which to return the path name result. pathlen Tells the available length of the path string, including the NUL terminator character. If path is too short to hold the full path name, only the first pathlen-1 characters are returned in a null-terminated string, and the return value is altered (see below). cache A flag that tells whether to save file information in memory allocated by and later, whether to use that saved information instead of searching again. However, an attempt to refresh the saved information will be made if the cache appears stale or if the file is not found. A subsequent call with cache non-zero can be much faster, especially if is a large tree, provided the saved information is not refreshed. However, the first call with cache true might be slower because must read all of the tree once to create the cache, rather than returning immediately upon finding a matching file. Any call with cache set to zero ignores the cache, if any, and reads the directory. To allow for possible future enhancements, cache should be restricted to the values 0 and 1. There is no way to tell to free its cached memory. ignores unreadable directories and files for which fails. RETURN VALUE
returns one of the following values: Successful. The result is in path. failed. contains the value returned from path might be altered if cache is set. If cache was set for the first time, freed any mem- ory allocated by the current call. No matching special file was found. is undefined. path is unaltered. A matching special file was found, but the name was truncated to fit in path. is undefined. If fails, silently abandons the attempt to do caching in the current or any later call with cache true, and frees any memory allocated by the current call. AUTHOR
was created by HP. SEE ALSO
devnm(1M), stat(2), ftw(3C), malloc(3C), ttyname(3C), stat(5), thread_safety(5). devnm(3)

Check Out this Related Man Page

statvfsdev(3C)															    statvfsdev(3C)

statvfsdev(), fstatvfsdev() - get file system information SYNOPSIS
returns information about the file system on the device file specified by path. The file system need not be mounted. returns similar information for an open file. The parameters for the and functions are as follows: path is a pointer to the name of the device file. (All directories listed in the path name must be searchable.) buf is a pointer to a structure, which is where the file status information is stored. fildes is a file descriptor for an open file, which is created with the successful completion of an or system call (see open(2), creat(2), dup(2), fcntl(2), or pipe(2)). buf is a pointer to a structure into which information is placed concerning the file system. The contents of the structure pointed to by buf are described in statvfs(2). returns the same information as above, but about the open device file referred to by file descriptor fildes. RETURN VALUE
Upon successful completion, and return zero. Otherwise, they return -1 and set the global variable to indicate the error. ERRORS
If fails, is set to one of the following values: Search permission is denied for a component of the path prefix. path points to an invalid address. Too many symbolic links are encountered during path-name translation. The maximum number of file descriptors allowed are currently open. The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. The system file table is full. The named file does not exist. A component of the path prefix is not a directory. The device specified by the named special file does not exist. Result would overflow one or more fields of the struct. If fails, is set to one of the following values: fildes is not a valid open file descriptor. filedes is invalid. When both and fail, is set to one of the following values: A system call was interrupted by a signal. The file specified by path or filedes does not contain a file system of any known type. Check with your system administrator to make sure the is running properly on your system. AUTHOR
and were developed by HP. SEE ALSO
bdf(1M), df(1M), stat(2), statvfs(2), fgetpos64(3S), thread_safety(5). statvfsdev(3C)

Featured Tech Videos