Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2009 20:24:59 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/include stdlib.h src/lib/libc/gen Makefile.inc Symbol.map devname.3 fdevname.c ttyname.c src/lib/libc/stdlib ptsname.c
Message-ID:  <200902112028.n1BKS8CF090561@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
ed          2009-02-11 20:24:59 UTC

  FreeBSD src repository

  Modified files:
    include              stdlib.h 
    lib/libc/gen         Makefile.inc Symbol.map devname.3 
                         ttyname.c 
    lib/libc/stdlib      ptsname.c 
  Added files:
    lib/libc/gen         fdevname.c 
  Log:
  SVN rev 188497 on 2009-02-11 20:24:59Z by ed
  
  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
  
  Revision  Changes    Path
  1.69      +2 -0      src/include/stdlib.h
  1.141     +3 -1      src/lib/libc/gen/Makefile.inc
  1.17      +2 -0      src/lib/libc/gen/Symbol.map
  1.20      +24 -2     src/lib/libc/gen/devname.3
  1.1       +54 -0     src/lib/libc/gen/fdevname.c (new)
  1.25      +2 -12     src/lib/libc/gen/ttyname.c
  1.2       +3 -5      src/lib/libc/stdlib/ptsname.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902112028.n1BKS8CF090561>