mirror of git://sourceware.org/git/glibc.git
[BZ #12340] Fix return code of the Hurd's ttyname_r.
This commit is contained in:
parent
c3b1bf7d85
commit
d653abb723
|
|
@ -1,3 +1,9 @@
|
|||
2012-04-05 Simon Josefsson <simon@josefsson.org>
|
||||
|
||||
[BZ #12340]
|
||||
* sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Return ERANGE instead of
|
||||
EINVAL when BUFLEN is too smal.
|
||||
|
||||
2012-04-05 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
[BZ #13553]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1994,1995,1996,1998,2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -42,7 +42,7 @@ __ttyname_r (int fd, char *buf, size_t buflen)
|
|||
len = strlen (nodename) + 1;
|
||||
if (len > buflen)
|
||||
{
|
||||
errno = EINVAL;
|
||||
errno = ERANGE;
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue