This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ttyname() and linux+devfs



Hi,

the ttyname() function looks in /dev/ and /dev/pts/ for the tty devices. I
use linux 2.1.126 with devfs - this means that my virtual consoles are
/dev/vc/*, my cua devices are /dev/cua/* and so on. It would be great if
the ttyname function could make a recursive scan thru the compleate /dev
directory structure instead of lokking only in /dev/ and /dev/pts/.

I would write a patch to do this - but I'm not sure about a few things
about the ttyname implementation - and I'm affraid to tuch the function
as long as I don't understand them compleatly. My 

 *) is the only diffrence between ttyname() and ttyname_r() the way how
    the name of the device is passed to the calling function?

 *) if so - why is the implementation so diffrent (i.e. why does not one
    function call the other one - I don't think the performance is
    the reason since this functions call a lot of system calls ...)?

greetings,

  -- clifford

--    --    --    --    --    --    --    --    --    --    --    --    --
Clifford Wolf (CEO and CTO)
The ROCK Projects Workgoup                          IRC: IRCnet / clifford
http://www.rock-projects.com/                      http://www.clifford.at/
e-mail: c.wolf@rock-projects.com                    email: god@clifford.at



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]