diff options
author | Christopher Faylor <me@cgf.cx> | 2012-04-13 06:30:51 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-04-13 06:30:51 +0400 |
commit | 3bfa9d984ba833fc4e439c2c3b706213880a8b37 (patch) | |
tree | ee1c8696de6e151b6eb54c6611afeb354dccc81f /winsup/cygwin/devices.cc | |
parent | 416b2d8719a91411f65e5d85cef9a74ea4045e79 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/devices.cc')
-rw-r--r-- | winsup/cygwin/devices.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc index 1c4a851b9..d67bcf4ba 100644 --- a/winsup/cygwin/devices.cc +++ b/winsup/cygwin/devices.cc @@ -67,18 +67,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<device *> (&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; } } |