This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch, master, updated. glibc-2.12-87-gfd3ebed


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  fd3ebedafc751998b4596d0277a704c41988d10b (commit)
      from  5a42321d438211210e0869e5e90f8d75d1354e14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd3ebedafc751998b4596d0277a704c41988d10b

commit fd3ebedafc751998b4596d0277a704c41988d10b
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Aug 3 09:54:22 2010 -0700

    Hurd: fix ttyname{,_r} errno result for non-ttys

diff --git a/ChangeLog b/ChangeLog
index bd589f7..ee565af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,13 @@
 	* hurd/hurdselect.c (_hurd_select): Round timeout up instead of down
 	when converting to ms.
 
+2010-06-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/mach/hurd/ttyname.c (ttyname): Replace MIG_BAD_ID and
+	EOPNOTSUPP errors with ENOTTY.
+	* sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Replace MIG_BAD_ID and
+	EOPNOTSUPP errors with ENOTTY.
+
 2010-07-31  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/x86_64/multiarch/Makefile [subdir=string] (sysdep_routines):
diff --git a/sysdeps/mach/hurd/ttyname.c b/sysdeps/mach/hurd/ttyname.c
index 927851e..6e2e5bf 100644
--- a/sysdeps/mach/hurd/ttyname.c
+++ b/sysdeps/mach/hurd/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 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
@@ -32,7 +32,11 @@ ttyname (int fd)
 
   nodename[0] = '\0';
   if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
-    return __hurd_dfail (fd, err), NULL;
+    {
+      if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+	err = ENOTTY;
+      return __hurd_dfail (fd, err), NULL;
+    }
 
   return nodename;
 }
diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c
index 8896252..5f6c9c3 100644
--- a/sysdeps/mach/hurd/ttyname_r.c
+++ b/sysdeps/mach/hurd/ttyname_r.c
@@ -34,7 +34,11 @@ __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), errno;
+    {
+      if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+        err = ENOTTY;
+      return __hurd_dfail (fd, err), errno;
+    }
 
   len = strlen (nodename) + 1;
   if (len > buflen)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                     |    7 +++++++
 sysdeps/mach/hurd/ttyname.c   |    8 ++++++--
 sysdeps/mach/hurd/ttyname_r.c |    6 +++++-
 3 files changed, 18 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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