libproc_dev(3)

libproc_dev3

Lookup device names and numbers tty_to_dev, dev_to_tty - lookup tty names and numbers

Usage

#include <proc/devname.h>

dev_t name_to_dev(char* name);
char* dev_to_name(dev_t num);
dev_t tty_to_dev(char *tty);
void  dev_to_tty(char *tty, dev_t dev);

Overview

Using (and updating, if possible) one of the psdevtab files (see section FILES) these functions convert device names (names of special files in /dev/) to device numbers and back. tty functions may use short forms for tty names (i.e. without leading tty or cu).
dev_to_tty will always return the abbreviated name and wants to have a string of length 4 as argument. Use dev_to_name to get the full name.

Files

/etc/psdevtab, /tmp/psdevtab, $HOME/psdevtab.

Releases

Unchanged in 2 releases since Debian 1.2 (Rex).

  1. 1.2–1.3

Author

The device lookup code in libproc was written by Charles L. Blake ([email protected]), this manpage was written by Helmut Geyer ([email protected]).

From libproc-dev 1.12.2 in Debian 1.3 (Bo). Parsed by carta from the page's man source.