From edc7ae4623eeb9a8112a6f89fbc91aae9f90cb6a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 5 Sep 2003 21:25:15 +0000 Subject: * nss/getXXbyYY.c (FUNCTION_NAME): Remove unused variable. 2003-09-04 Roland McGrath * sysdeps/mach/hurd/mmap.c (__mmap): If io_map fails with MIG_BAD_ID, EOPNOTSUPP, or ENOSYS, change it to ENODEV. --- ChangeLog | 9 +++++++++ sysdeps/mach/hurd/mmap.c | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57c2b27..78ae230 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-09-05 Roland McGrath + + * nss/getXXbyYY.c (FUNCTION_NAME): Remove unused variable. + +2003-09-04 Roland McGrath + + * 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 * sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (MINSIGSTKSZ): diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index c54bc0c..85bde52 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: -- cgit v1.1