aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-09-05 21:25:15 +0000
committerRoland McGrath <roland@gnu.org>2003-09-05 21:25:15 +0000
commitedc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a (patch)
treed012def16c08a39c3121eb4d8214b7e91f9ed9ae
parent09b9a9d032a6fc0fbe602644f20263c5cdcb397e (diff)
downloadglibc-edc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a.tar
glibc-edc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a.tar.gz
glibc-edc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a.tar.bz2
glibc-edc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a.zip
* nss/getXXbyYY.c (FUNCTION_NAME): Remove unused variable.
2003-09-04 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/mmap.c (__mmap): If io_map fails with MIG_BAD_ID, EOPNOTSUPP, or ENOSYS, change it to ENODEV.
-rw-r--r--ChangeLog9
-rw-r--r--sysdeps/mach/hurd/mmap.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 57c2b273c7..78ae230428 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-05 Roland McGrath <roland@redhat.com>
+
+ * nss/getXXbyYY.c (FUNCTION_NAME): Remove unused variable.
+
+2003-09-04 Roland McGrath <roland@frob.com>
+
+ * sysdeps/mach/hurd/mmap.c (__mmap): If io_map fails with MIG_BAD_ID,
+ EOPNOTSUPP, or ENOSYS, change it to ENODEV.
+
2003-09-04 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (MINSIGSTKSZ):
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index c54bc0c188..85bde529b9 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1995,1996,1997,1999,2002,2003
+ 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
@@ -97,7 +98,11 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
mach_port_t robj, wobj;
if (err = HURD_DPORT_USE (fd, __io_map (port, &robj, &wobj)))
- return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ {
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP || err == ENOSYS)
+ err = ENODEV; /* File descriptor doesn't support mmap. */
+ return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ }
switch (prot & (PROT_READ|PROT_WRITE))
{
case PROT_READ: