summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fdevname.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove (hidden) warning about missing prototypes for fdevname(3).ed2009-12-051-0/+1
|
* Add two new routines: fdevname() and fdevname_r().ed2009-02-111-0/+54
A more elegant way of obtaining a name of a character device by its file descriptor on FreeBSD, is to use the FIODGNAME ioctl. Because a valid file descriptor implies a file descriptor is visible in /dev, it will always resolve a valid device name. I'm adding a more friendly wrapper for this ioctl, called fdevname(). It is a lot easier to use than devname() and also has better error handling. When a device name cannot be resolved, it will just return NULL instead of a generated device name that makes no sense. Discussed with: kib
OpenPOWER on IntegriCloud