Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/devices.cc')
-rw-r--r--winsup/cygwin/devices.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
index e2a776a5b..1c4a851b9 100644
--- a/winsup/cygwin/devices.cc
+++ b/winsup/cygwin/devices.cc
@@ -6,10 +6,7 @@
#include "tty.h"
#include "pinfo.h"
#include "shared_info.h"
-#include "path.h"
-#include "fhandler.h"
#include "ntdll.h"
-
typedef const device *KR_device_t;
@@ -70,16 +67,18 @@ exists_ntdev_silent (const device& dev)
static int
exists_console (const device& dev)
{
+ if (!iscons_dev (myself->ctty))
+ return false;
int devn = *const_cast<device *> (&dev);
switch (devn)
{
case FH_CONSOLE:
case FH_CONIN:
case FH_CONOUT:
- return fhandler_console::exists ();
+ return true;
default:
/* Only show my own console device (for now?) */
- return iscons_dev (myself->ctty) && myself->ctty == devn;
+ return myself->ctty == devn;
}
}
@@ -244,7 +243,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/kmem", exists, S_IFCHR, true},
+ {"/dev/kmem", BRACK(FH_KMEM), "/dev/mem", 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},