diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-10-30 13:44:47 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-10-30 13:44:47 +0400 |
commit | 751bbaf96ae7ee249d7f5cb243b1239779ca0530 (patch) | |
tree | a7c6fbb535a816767ae9a7231458d3688bea8b17 /winsup/cygwin/devices.in | |
parent | 0160e166ee3c6a87c9e95c2d75ee2d2a0c4c2a29 (diff) |
* devices.in (dev_cygdrive_storage): Map to \Device\Null.
(dev_storage): Map /dev and /dev/windows to \Device\Null.
* devices.cc: Regenerate.
* dir.cc (opendir): Create unique id. Explain why.
* fhandler.h (fhandler_dev::get_dev): Implement inline.
(fhandler_cygdrive::close): Drop declaration.
(fhandler_cygdrive::get_dev): Implement inline.
(fhandler_windows::get_hwnd): Ditto.
(fhandler_windows::set_close_on_exec): Drop declaration.
(fhandler_windows::fixup_after_fork): Ditto.
* fhandler_dev.cc (fhandler_dev::open): Call fhandler_disk_file::open
without O_CREAT flag. Explain why. Create \Device\Null handle if
/dev/ doesn't actually exist.
(fhandler_dev::close): Drop nohandle case.
(fhandler_dev::fstatvfs): Drop nohandle check. Test for fs_got_fs
instead. Set ST_RDONLY fs flag for simulated /dev.
(fhandler_dev::opendir): If /dev doesn't exist, call open() to create
fake \Device\Null handle. Don't set nohandle. Set dir_exists
correctly.
(fhandler_dev::rewinddir): Call fhandler_disk_file::rewinddir only if
/dev is a real directory.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): If called for
the cygdrive dir, call open() to create fake \Device\Null handle.
Only attach __DIR_mounts buffer to dir if not called for cygdrive dir.
Don't set nohandle.
(fhandler_cygdrive::open): Create \Device\Null handle.
(fhandler_cygdrive::close): Remove.
(fhandler_cygdrive::fstatvfs): Set ST_RDONLY fs flag.
* fhandler_windows.cc (fhandler_windows::open): Create \Device\Null
handle.
(fhandler_windows::read): Don't add io_handle to WFMO handle array.
Change subsequent test for return value accordingly. Fix test for
"message arrived".
(fhandler_windows::set_close_on_exec): Remove.
(fhandler_windows::fixup_after_fork): Remove.
* path.h (path_conv::set_path): Make sure wide_path is NULL when
setting a new path.
* select.cc (peek_windows): Use correct hWnd value, not io_handle.
(fhandler_windows::select_read): Don't use io_handle as wait object.
(fhandler_windows::select_write): Ditto.
(fhandler_windows::select_except): Ditto.
Diffstat (limited to 'winsup/cygwin/devices.in')
-rw-r--r-- | winsup/cygwin/devices.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index bba5fdd7c..520191eb7 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -87,7 +87,7 @@ exists_pty (const device& dev) } const device dev_cygdrive_storage = - {"/cygdrive", {FH_CYGDRIVE}, "/cygdrive", exists}; + {"/cygdrive", {FH_CYGDRIVE}, "\\Device\\Null", exists}; const device dev_fs_storage = {"", {FH_FS}, "", exists}; @@ -140,14 +140,14 @@ const device dev_error_storage = /* Internal devices below are prefixed with a ":". This moves them out of the POSIX namespace. */ %% -"/dev", BRACK(FH_DEV), "/dev", exists, S_IFDIR +"/dev", BRACK(FH_DEV), "\\Device\\Null", exists, S_IFDIR "/dev/tty", BRACK(FH_TTY), "/dev/tty", exists, S_IFCHR "/dev/pty%(0-63)d", BRACK(FHDEV(DEV_PTYS_MAJOR, {$1})), "/dev/pty{$1}", exists_pty, S_IFCHR, =ptys_dev ":ptym%(0-63)d", BRACK(FHDEV(DEV_PTYM_MAJOR, {$1})), "/dev/ptym{$1}", exists_internal, S_IFCHR, =ptym_dev "/dev/cons%(0-63)d", BRACK(FHDEV(DEV_CONS_MAJOR, {$1})), "/dev/cons{$1}", exists_console, S_IFCHR, =cons_dev "/dev/console", BRACK(FH_CONSOLE), "/dev/console", exists_console, S_IFCHR, =console_dev "/dev/ptmx", BRACK(FH_PTMX), "/dev/ptmx", exists, S_IFCHR -"/dev/windows", BRACK(FH_WINDOWS), "/dev/windows", exists, S_IFCHR +"/dev/windows", BRACK(FH_WINDOWS), "\\Device\\Null", exists_ntdev, S_IFCHR "/dev/dsp", BRACK(FH_OSS_DSP), "\\Device\\Null", exists_ntdev, S_IFCHR "/dev/conin", BRACK(FH_CONIN), "/dev/conin", exists_console, S_IFCHR "/dev/conout", BRACK(FH_CONOUT), "/dev/conout", exists_console, S_IFCHR |