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:
authorChristopher Faylor <me@cgf.cx>2004-06-04 02:27:25 +0400
committerChristopher Faylor <me@cgf.cx>2004-06-04 02:27:25 +0400
commit04612c69eb22ce29040765a84841591ece412d68 (patch)
tree4cfb0ac3f4b18e1fbc4935b6b87db22770e44a45
parent3ec8da655c7df40c184b347d556c553663e47f3d (diff)
* autoload.cc (IsDosDeviceName_U): Define.
* ntdll.h (IsDosDeviceName_U): Declare. * fhandler.cc (fhandler_base::open): Check to see if win32_name is a dos device and just call the 9x open if so.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler.cc12
2 files changed, 15 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0b73f6733..6385fc102 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2004-06-03 Christopher Faylor <cgf@alum.bu.edu>
+ * autoload.cc (IsDosDeviceName_U): Define.
+ * ntdll.h (IsDosDeviceName_U): Declare.
+ * fhandler.cc (fhandler_base::open): Check to see if win32_name is a
+ dos device and just call the 9x open if so.
+
+2004-06-03 Christopher Faylor <cgf@alum.bu.edu>
+
* winbase.h (ilockincr): More changes from the inexplicable world of
gcc asm magic.
(ilockdecr): Ditto.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index c481bde29..f319d489a 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -534,6 +534,13 @@ fhandler_base::open (int flags, mode_t mode)
if (!wincap.is_winnt ())
return fhandler_base::open_9x (flags, mode);
+ UNICODE_STRING upath;
+ WCHAR wpath[CYG_MAX_PATH + 10];
+ pc.get_nt_native_path (upath, wpath);
+
+ if (RtlIsDosDeviceName_U (wpath))
+ return fhandler_base::open_9x (flags, mode);
+
int res = 0;
HANDLE x;
ULONG file_attributes = 0;
@@ -542,8 +549,6 @@ fhandler_base::open (int flags, mode_t mode)
ULONG create_options;
SECURITY_ATTRIBUTES sa = sec_none;
security_descriptor sd;
- UNICODE_STRING upath;
- WCHAR wpath[CYG_MAX_PATH + 10];
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK io;
NTSTATUS status;
@@ -555,8 +560,7 @@ fhandler_base::open (int flags, mode_t mode)
goto done;
}
- InitializeObjectAttributes (&attr, pc.get_nt_native_path (upath, wpath),
- OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
+ InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
sa.lpSecurityDescriptor, NULL);
switch (query_open ())