[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r10320 - in /fsf/trunk/libc: ChangeLog hurd/lookup-at.c sysdeps/mach/hurd/ttyname_r.c



Author: eglibc
Date: Tue Apr 27 00:03:43 2010
New Revision: 10320

Log:
Import glibc-mainline for 2010-04-27

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/hurd/lookup-at.c
    fsf/trunk/libc/sysdeps/mach/hurd/ttyname_r.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Apr 27 00:03:43 2010
@@ -1,3 +1,13 @@
+2010-04-25  Bruno Haible  <bruno@xxxxxxxxx>
+
+	[BZ #11537]
+	* sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Upon failure, return
+	errno, not -1.
+
+2010-04-24  Emilio Pozuelo Monfort  <pochu27@xxxxxxxxx>
+
+	* hurd/lookup-at.c (__file_name_lookup_at): Fix error return value.
+
 2010-04-22  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* po/vi.po: Update from translation team.

Modified: fsf/trunk/libc/hurd/lookup-at.c
==============================================================================
--- fsf/trunk/libc/hurd/lookup-at.c (original)
+++ fsf/trunk/libc/hurd/lookup-at.c Tue Apr 27 00:03:43 2010
@@ -1,5 +1,5 @@
 /* Lookup helper function for Hurd implementation of *at functions.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006,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
@@ -33,7 +33,7 @@
   flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
   at_flags &= ~AT_SYMLINK_NOFOLLOW;
   if (at_flags != 0)
-    return __hurd_fail (EINVAL);
+    return (__hurd_fail (EINVAL), MACH_PORT_NULL);
 
   if (fd == AT_FDCWD || file_name[0] == '/')
     return __file_name_lookup (file_name, flags, mode);

Modified: fsf/trunk/libc/sysdeps/mach/hurd/ttyname_r.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/ttyname_r.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/ttyname_r.c Tue Apr 27 00:03:43 2010
@@ -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 @@
 
   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);