This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 22 Dec 2010 17:29:49 +0000
- Subject: [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE
- Auto-submitted: auto-generated
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.