Revert erroneous checkin.

This commit is contained in:
Corinna Vinschen
2005-09-28 19:22:25 +00:00
parent 1204c515fe
commit dcb091caaf
26 changed files with 172 additions and 500 deletions

View File

@@ -555,13 +555,12 @@ fhandler_base::open (int flags, mode_t mode)
if (!wincap.is_winnt ())
return fhandler_base::open_9x (flags, mode);
UNICODE_STRING upath;
if (!pc.get_nt_native_path (upath))
{
syscall_printf ("0 = fhandler_base::open (%s, %p)",
get_win32_name (), flags);
return 0;
}
WCHAR wpath[CYG_MAX_PATH + 10];
UNICODE_STRING upath = {0, sizeof (wpath), wpath};
pc.get_nt_native_path (upath);
if (RtlIsDosDeviceName_U (upath.Buffer))
return fhandler_base::open_9x (flags, mode);
int res = 0;
HANDLE x;
@@ -577,8 +576,7 @@ fhandler_base::open (int flags, mode_t mode)
syscall_printf ("(%s, %p)", get_win32_name (), flags);
InitializeObjectAttributes (&attr, &upath,
OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
sa.lpSecurityDescriptor, NULL);
switch (query_open ())
@@ -683,7 +681,6 @@ done:
syscall_printf ("%d = fhandler_base::open (%s, %p)", res, get_win32_name (),
flags);
RtlFreeUnicodeString (&upath);
return res;
}
@@ -1266,15 +1263,14 @@ fhandler_base::init (HANDLE f, DWORD a, mode_t bin)
}
int
fhandler_base::dup (fhandler_base *child, HANDLE from_proc)
fhandler_base::dup (fhandler_base *child)
{
debug_printf ("in fhandler_base dup");
HANDLE nh;
set_flags (child->get_flags ());
if (!nohandle ())
{
if (!DuplicateHandle (from_proc, get_handle (), hMainProc, &nh, 0, TRUE,
if (!DuplicateHandle (hMainProc, get_handle (), hMainProc, &nh, 0, TRUE,
DUPLICATE_SAME_ACCESS))
{
debug_printf ("dup(%s) failed, handle %x, %E",
@@ -1286,6 +1282,7 @@ fhandler_base::dup (fhandler_base *child, HANDLE from_proc)
VerifyHandle (nh);
child->set_io_handle (nh);
}
set_flags (child->get_flags ());
return 0;
}