Hurd: fixes for ptsname and ptsname_r
authorPino Toscano <toscano.pino@tiscali.it>
Mon, 19 Nov 2012 23:49:11 +0000 (00:49 +0100)
committerPino Toscano <toscano.pino@tiscali.it>
Mon, 19 Nov 2012 23:49:11 +0000 (00:49 +0100)
commit986cab95e068f79e752fc11e981de8e472c23961
tree5985d6c8709a42aa6fb246a19fd9650ccd627a9f
parent6d33cc9d9bde501e0906c42ee396d42cb4ca603c
Hurd: fixes for ptsname and ptsname_r

ptsname_r on failure returns the value that is also set as errno; furthermore,
add more checks to it:
- set errno and return it on __term_get_peername failure
- set errno to ERANGE other than returning it
- change the type of PEERNAME to string_t, and check its length with __strnlen

In ptsname:
- change the type of PEERNAME to string_t
- do not set errno manually, since ptsname_r has set it already
ChangeLog
sysdeps/mach/hurd/ptsname.c