[patch] cleanup ttyname and make it devfs friendly

Ben Collins bcollins@debian.org
Mon Oct 29 17:47:00 GMT 2001


This is due to popular demand since ttyname doesn't work with sgid apps
with devfs only systems. Since I had to add /dev/vc/ to the list of
directories to search, I figured I'd clean things up a bit to make it
easier to read. Tested with current CVS.

2001-10-29  Ben Collins  <bcollins@debian.org>

	* sysdeps/unix/sysv/linux/ttyname.c(getttyname): Take a single
	struct stat64* for an arg, so we can do all the work out the
	_STATBUF_ST_RDEV in one place.
	(ttyname): Update usage of getttyname(). Also cleanup the checks
	for /dev/<subdir> searches and add /dev/vc/ to the search for
	devfs only systems.
	* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/                   Ben Collins    --    Debian GNU/Linux                  \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'


More information about the Libc-alpha mailing list