From 3bfa9d984ba833fc4e439c2c3b706213880a8b37 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 13 Apr 2012 02:30:51 +0000 Subject: * devices.in (exists_console): Allow /dev/con{sole,in,out} to be referenced they exist. * devices.cc: Regenerate. * fhandler_console.cc (fhandler_console::set_unit): Ditto. --- winsup/cygwin/devices.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/devices.in') diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index e5032f6ca..b656886ee 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -63,18 +63,16 @@ exists_ntdev_silent (const device& dev) static int exists_console (const device& dev) { - if (!iscons_dev (myself->ctty)) - return false; int devn = *const_cast (&dev); switch (devn) { case FH_CONSOLE: case FH_CONIN: case FH_CONOUT: - return true; + return !!GetConsoleCP (); default: /* Only show my own console device (for now?) */ - return myself->ctty == devn; + return iscons_dev (myself->ctty) && myself->ctty == devn; } } -- cgit v1.2.3