diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-05-22 21:37:40 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-05-22 21:37:40 +0400 |
commit | 73447abbb6b02a5b64938e20519594cd4de4c994 (patch) | |
tree | 201ca9ad1eac757034c225358d61eac58f1f71d5 /winsup | |
parent | 601431090344d2db08f9f19b30a8affb05a7ce0c (diff) |
* devices.in: Fix native name of /dev/kmem.
* devices.cc: Regenerate.
* dtable.cc (fh_alloc): Don't forget FH_KMEM.
* fhandler_mem.cc (fhandler_dev_mem::open): Set errno to EACCES rather
than ENOENT on systems not granting access to physical memory from
user space.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/cygwin/devices.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/devices.in | 2 | ||||
-rw-r--r-- | winsup/cygwin/dtable.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_mem.cc | 4 |
5 files changed, 14 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 263979b6a..c87f6016e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,14 @@ 2012-05-22 Corinna Vinschen <corinna@vinschen.de> + * devices.in: Fix native name of /dev/kmem. + * devices.cc: Regenerate. + * dtable.cc (fh_alloc): Don't forget FH_KMEM. + * fhandler_mem.cc (fhandler_dev_mem::open): Set errno to EACCES rather + than ENOENT on systems not granting access to physical memory from + user space. + +2012-05-22 Corinna Vinschen <corinna@vinschen.de> + * thread.cc (pthread::cancel): Set thread's cancel_event in PTHREAD_CANCEL_ASYNCHRONOUS case, too. Explain why. diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc index 9c8a0d03c..e2a776a5b 100644 --- a/winsup/cygwin/devices.cc +++ b/winsup/cygwin/devices.cc @@ -244,7 +244,7 @@ const _RDATA device dev_storage[] = {"/dev/fd14", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 14)), "\\Device\\Floppy14", exists_ntdev, S_IFBLK, true}, {"/dev/fd15", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 15)), "\\Device\\Floppy15", exists_ntdev, S_IFBLK, true}, {"/dev/full", BRACK(FH_FULL), "/dev/full", exists, S_IFCHR, true}, - {"/dev/kmem", BRACK(FH_KMEM), "/dev/mem", exists, S_IFCHR, true}, + {"/dev/kmem", BRACK(FH_KMEM), "/dev/kmem", exists, S_IFCHR, true}, {"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg", exists_ntdev, S_IFCHR, true}, {"/dev/mem", BRACK(FH_MEM), "/dev/mem", exists, S_IFCHR, true}, {"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0", exists_ntdev, S_IFBLK, true}, diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index 09a1f7da5..213226ae6 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -157,7 +157,7 @@ const device dev_error_storage = "/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR "/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, =urandom_dev "/dev/mem", BRACK(FH_MEM), "/dev/mem", exists, S_IFCHR -"/dev/kmem", BRACK(FH_KMEM), "/dev/mem", exists, S_IFCHR +"/dev/kmem", BRACK(FH_KMEM), "/dev/kmem", exists, S_IFCHR "/dev/clipboard", BRACK(FH_CLIPBOARD), "/dev/clipboard", exists, S_IFCHR "/dev/port", BRACK(FH_PORT), "/dev/port", exists, S_IFCHR "/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}", exists_ntdev_silent, S_IFCHR diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 1cd1f6b48..fc3a502f9 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -530,6 +530,7 @@ fh_alloc (path_conv& pc) fh = cnew (fhandler_dev_random); break; case FH_MEM: + case FH_KMEM: case FH_PORT: fh = cnew (fhandler_dev_mem); break; diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index c3c442ebd..6b3431bbb 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -1,7 +1,7 @@ /* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes. Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, - 2010, 2011 Red Hat, Inc. + 2010, 2011, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -36,7 +36,7 @@ fhandler_dev_mem::open (int flags, mode_t) if (!wincap.has_physical_mem_access ()) { - set_errno (ENOENT); + set_errno (EACCES); debug_printf ("%s is accessible under NT4/W2K/XP only", dev ().name); return 0; } |