git: fdevname - Set errno if fdevname_r call fails; don't prepend /dev

Alex Hornung alexh at crater.dragonflybsd.org
Tue Aug 11 04:05:58 PDT 2009


commit 65653ce53bb5cbe57fa398275e47fe1ce54d67f0
Author: Alex Hornung <ahornung at gmail.com>
Date:   Tue Aug 11 10:29:45 2009 +0100

    fdevname - Set errno if fdevname_r call fails; don't prepend /dev
    
    * Return EINVAL if the fd does not belong to a character device and
      return EBADF if the fd is not valid.
    
    * If fdevname_r returns non-null when called from fdevname, set errno
      in fdevname to whatever *_r returned.
    
    * Don't prepend "/dev/" string to the returned buffer, just put in
      the device name itself, without absolute path.
    
    Reported-By: Sascha Wildner

Summary of changes:
 lib/libc/gen/fdevname.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/65653ce53bb5cbe57fa398275e47fe1ce54d67f0


-- 
DragonFly BSD source repository





More information about the Commits mailing list