Reference

libproc_dev(3)

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

NAME

name_to_dev, dev_to_name - lookup device names and numbers tty_to_dev, dev_to_tty - lookup tty names and numbers

SYNOPSIS

#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);

DESCRIPTION

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.

AUTHOR

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