aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-17 23:19:36 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-17 23:19:36 +0000
commit2d9b02a408070f33d20a4f8f650fe729f2d12dcf (patch)
treea7cfbeaf1d3e0ba939b4b954044c17678dc724a6 /sysdeps
parent3a0e90bd8b7769c863d19fe734ad6ad8fd831bea (diff)
downloadglibc-2d9b02a408070f33d20a4f8f650fe729f2d12dcf.tar
glibc-2d9b02a408070f33d20a4f8f650fe729f2d12dcf.tar.gz
glibc-2d9b02a408070f33d20a4f8f650fe729f2d12dcf.tar.bz2
glibc-2d9b02a408070f33d20a4f8f650fe729f2d12dcf.zip
Update.
* sysdeps/unix/sysv/linux/ia64/ioperm.c (_iopl): Match EPERM error the x86 code produces in case of mission permissions. Patch by Bernd Schmidt <bernds@redhat.com>.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/ioperm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/ioperm.c b/sysdeps/unix/sysv/linux/ia64/ioperm.c
index 062ed2eb3e..89a0a36d3d 100644
--- a/sysdeps/unix/sysv/linux/ia64/ioperm.c
+++ b/sysdeps/unix/sysv/linux/ia64/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
@@ -137,7 +137,13 @@ _iopl (unsigned int level)
return -1;
}
if (level)
- return _ioperm (0, MAX_PORT, 1);
+ {
+ int retval = _ioperm (0, MAX_PORT, 1);
+ /* Match the documented error returns of the x86 version. */
+ if (retval < 0 && errno == EACCES)
+ __set_errno (EPERM);
+ return retval;
+ }
return 0;
}