diff options
author | Bruno Haible <bruno@clisp.org> | 2010-04-26 10:07:15 -0700 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2010-05-12 03:21:19 +0200 |
commit | ca27df35b7e821a800c9302bc06b7923e1ff59fd (patch) | |
tree | 73607c2930de91097713fb93252806b33cee6e3f /sysdeps | |
parent | 49c6fd1ff2a550ad407054a2821d654c41e22679 (diff) | |
download | glibc-ca27df35b7e821a800c9302bc06b7923e1ff59fd.tar.gz glibc-ca27df35b7e821a800c9302bc06b7923e1ff59fd.tar.xz glibc-ca27df35b7e821a800c9302bc06b7923e1ff59fd.zip |
BZ #11537: Hurd: Fix ttyname_r error return value.
(cherry picked from commit 6cffee3611f324326ae46bb02d2baeb62c0db6a4)
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/ttyname_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c index 7313b9afcb..8896252246 100644 --- a/sysdeps/mach/hurd/ttyname_r.c +++ b/sysdeps/mach/hurd/ttyname_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 95, 96, 98 Free Software Foundation, Inc. +/* Copyright (C) 1994,1995,1996,1998,2010 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 @@ -34,13 +34,13 @@ __ttyname_r (int fd, char *buf, size_t buflen) nodename[0] = '\0'; if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename))) - return __hurd_dfail (fd, err), -1; + return __hurd_dfail (fd, err), errno; len = strlen (nodename) + 1; if (len > buflen) { errno = EINVAL; - return -1; + return errno; } memcpy (buf, nodename, len); |