From 990690655ca59784c81430e7d258fd9a2231b6cb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 16 Oct 2001 14:53:26 +0000 Subject: * autoload.cc: Add load statement for `NtOpenFile'. * fhandler.h (fhandler_dev_raw::get_unit): New method. (fhandler_dev_tape::norewind): Eliminate. (fhandler_dev_tape::is_rewind_device): New method. * fhandler_raw.cc (fhandler_dev_raw::open): Open new fixed device name devices using NT internal method. Keep calling fhandler_base::open() for old mount table device mapping compatibility devices. (fhandler_dev_raw::fstat): Eliminate. Settings are done by fhandler_base::fstat() already. * fhandler_tape.cc: Remove `norewind' usage throughout. * ntdll.h: Define FILE_SYNCHRONOUS_IO_NONALERT. Define struct _IO_STATUS_BLOCK. Declare NtOpenFile(). * path.cc (get_raw_device_number): Add new approach for using fixed device names. (win32_device_name): Ditto. (get_device_number): Ditto. Require POSIX path to begin with "/dev/". (mount_info::conv_to_win32_path): Call win32_device_name() instead of get_device_number() after evaluating mount points to allow changing the win32 destination path again. * security.cc (str2buf2uni): Remove `static' to be able to call function from fhandler_dev_raw::open(). * wincap.cc: Set flag has_raw_devices appropriately. * wincap.h: Add flag has_raw_devices. --- winsup/cygwin/ntdll.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'winsup/cygwin/ntdll.h') diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 6dd617c60..e1ec33bc1 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -9,6 +9,7 @@ details. */ #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xc0000004) +#define FILE_SYNCHRONOUS_IO_NONALERT 32 typedef enum _SYSTEM_INFORMATION_CLASS { @@ -132,6 +133,12 @@ typedef struct _SYSTEM_PROCESSES SYSTEM_THREADS Threads[1]; } SYSTEM_PROCESSES, *PSYSTEM_PROCESSES; +typedef struct _IO_STATUS_BLOCK +{ + NTSTATUS Status; + ULONG Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + /* Function declarations for ntdll.dll. These don't appear in any standard Win32 header. */ extern "C" @@ -144,6 +151,8 @@ extern "C" NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG, ULONG, PLARGE_INTEGER, PULONG, SECTION_INHERIT, ULONG, ULONG); + NTSTATUS NTAPI NtOpenFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, + PIO_STATUS_BLOCK, ULONG, ULONG); NTSTATUS NTAPI NtOpenSection (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); -- cgit v1.2.3