about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-11-18 16:41:00 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-11-18 16:49:08 -0200
commite92bd6e362470aa0a79cfb19a512944f0761184b (patch)
treec890d3d7f2a9680c4f9d6ac9d9b7f1e7b7328784 /hurd
parentc73c7fc07c001f2a907a9c6d50c57d377ce0351f (diff)
downloadglibc-e92bd6e362470aa0a79cfb19a512944f0761184b.tar.gz
glibc-e92bd6e362470aa0a79cfb19a512944f0761184b.tar.xz
glibc-e92bd6e362470aa0a79cfb19a512944f0761184b.zip
Fix hurd __access_noerrno implementation.
This patch fixes some hurd bits from commit afcf3cd8eb that added the
__access_noerrno internal symbol.  It basically removes the nonrequired
__hurd_fail_noerrno (since the 'err' argument is ignored) and fixes
a typo for EACCES.

However, as stated on maillist [1] this __access_noerrno may still be
unsafe to run during initialization of tunables on the Hurd.  The
access_common calls __hurd_file_name_lookup, which calls
__hurd_file_name_lookup_retry, which can set errno.

[1] https://sourceware.org/ml/libc-alpha/2016-11/msg00646.html
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurd.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/hurd/hurd.h b/hurd/hurd.h
index c089d4c445..ec0782797d 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -75,35 +75,6 @@ __hurd_fail (error_t err)
   errno = err;
   return -1;
 }
-
-_HURD_H_EXTERN_INLINE int
-__hurd_fail_noerrno (error_t err)
-{
-  switch (err)
-    {
-    case EMACH_SEND_INVALID_DEST:
-    case EMIG_SERVER_DIED:
-      /* The server has disappeared!  */
-      err = EIEIO;
-      break;
-
-    case KERN_NO_SPACE:
-      err = ENOMEM;
-      break;
-
-    case KERN_INVALID_ARGUMENT:
-      err = EINVAL;
-      break;
-
-    case 0:
-      return 0;
-
-    default:
-      break;
-    }
-
-  return -1;
-}
 
 /* Basic ports and info, initialized by startup.  */