This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE


http://sourceware.org/bugzilla/show_bug.cgi?id=12340

           Summary: ttyname_r returns EINVAL instead of ERANGE
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: minor
          Priority: P2
         Component: hurd
        AssignedTo: roland@gnu.org
        ReportedBy: bruno@clisp.org


ttyname_r is specified in POSIX
<http://www.opengroup.org/onlinepubs/9699919799/functions/ttyname.html>.
The error condition "The value of namesize is smaller than the length of
the string to be returned" is identified with the error value ERANGE.
But sysdeps/mach/hurd/ttyname_r.c returns EINVAL in this case.
(Whereas sysdeps/posix/ttyname_r.c and sysdeps/unix/sysv/linux/ttyname_r.c
return ERANGE, as expected.)

Suggestion: Use ERANGE instead of EINVAL in sysdeps/mach/hurd/ttyname_r.c.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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