* 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.
This commit is contained in:
parent
6014310903
commit
73447abbb6
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2012-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* thread.cc (pthread::cancel): Set thread's cancel_event in
|
* thread.cc (pthread::cancel): Set thread's cancel_event in
|
||||||
|
|
|
@ -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/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/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/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/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/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},
|
{"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0", exists_ntdev, S_IFBLK, true},
|
||||||
|
|
|
@ -157,7 +157,7 @@ const device dev_error_storage =
|
||||||
"/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR
|
"/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR
|
||||||
"/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, =urandom_dev
|
"/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, =urandom_dev
|
||||||
"/dev/mem", BRACK(FH_MEM), "/dev/mem", exists, S_IFCHR
|
"/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/clipboard", BRACK(FH_CLIPBOARD), "/dev/clipboard", exists, S_IFCHR
|
||||||
"/dev/port", BRACK(FH_PORT), "/dev/port", 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
|
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}", exists_ntdev_silent, S_IFCHR
|
||||||
|
|
|
@ -530,6 +530,7 @@ fh_alloc (path_conv& pc)
|
||||||
fh = cnew (fhandler_dev_random);
|
fh = cnew (fhandler_dev_random);
|
||||||
break;
|
break;
|
||||||
case FH_MEM:
|
case FH_MEM:
|
||||||
|
case FH_KMEM:
|
||||||
case FH_PORT:
|
case FH_PORT:
|
||||||
fh = cnew (fhandler_dev_mem);
|
fh = cnew (fhandler_dev_mem);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
|
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
|
||||||
|
|
||||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
|
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.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ fhandler_dev_mem::open (int flags, mode_t)
|
||||||
|
|
||||||
if (!wincap.has_physical_mem_access ())
|
if (!wincap.has_physical_mem_access ())
|
||||||
{
|
{
|
||||||
set_errno (ENOENT);
|
set_errno (EACCES);
|
||||||
debug_printf ("%s is accessible under NT4/W2K/XP only", dev ().name);
|
debug_printf ("%s is accessible under NT4/W2K/XP only", dev ().name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue