summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/Symbol.map
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-11 20:24:59 +0000
committered <ed@FreeBSD.org>2009-02-11 20:24:59 +0000
commitde78bbbfe832781ef4718e4d175d53fbe4e7ac40 (patch)
tree0b13c353e44fe54b12f0be5c1ae687436add79ee /lib/libc/gen/Symbol.map
parentc1e92bfb206adffe9aca701014c9028722d1ed02 (diff)
downloadFreeBSD-src-de78bbbfe832781ef4718e4d175d53fbe4e7ac40.zip
FreeBSD-src-de78bbbfe832781ef4718e4d175d53fbe4e7ac40.tar.gz
Add two new routines: fdevname() and fdevname_r().
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
Diffstat (limited to 'lib/libc/gen/Symbol.map')
-rw-r--r--lib/libc/gen/Symbol.map2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index 2e64313..afdecb5 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -331,6 +331,8 @@ FBSD_1.0 {
FBSD_1.1 {
arc4random_buf;
arc4random_uniform;
+ fdevname;
+ fdevname_r;
fdopendir;
feature_present;
fts_open;
OpenPOWER on IntegriCloud