ntdll/kernel32: #19

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



a small one
A+

--
Eric Pouech
Name:          ntkrnl_19
ChangeLog:     Moved kernel32.FlushFileBuffers to ntdll.NtFlushBuffersFile
License:       X11
GenDate:       2003/04/19 20:05:27 UTC
ModifiedFiles: files/file.c dlls/ntdll/file.c dlls/ntdll/ntdll.spec
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/files/file.c,v
retrieving revision 1.179
diff -u -u -r1.179 file.c
--- files/file.c	18 Mar 2003 05:04:34 -0000	1.179
+++ files/file.c	19 Apr 2003 19:54:54 -0000
@@ -2361,14 +2361,17 @@
  */
 BOOL WINAPI FlushFileBuffers( HANDLE hFile )
 {
-    BOOL ret;
-    SERVER_START_REQ( flush_file )
+    NTSTATUS            nts;
+    IO_STATUS_BLOCK     ioblk;
+
+    nts = NtFlushBuffersFile( hFile, &ioblk );
+    if (nts != STATUS_SUCCESS)
     {
-        req->handle = hFile;
-        ret = !wine_server_call_err( req );
+        SetLastError( RtlNtStatusToDosError( nts ) );
+        return FALSE;
     }
-    SERVER_END_REQ;
-    return ret;
+
+    return TRUE;
 }
 
 
Index: dlls/ntdll/file.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/file.c,v
retrieving revision 1.20
diff -u -u -r1.20 file.c
--- dlls/ntdll/file.c	7 Jan 2003 20:36:28 -0000	1.20
+++ dlls/ntdll/file.c	19 Apr 2003 19:59:05 -0000
@@ -490,4 +490,20 @@
 	IoStatusBlock->DUMMYUNIONNAME.Status = STATUS_SUCCESS;
 	IoStatusBlock->Information = len;
 	return STATUS_SUCCESS;
+}
+
+/******************************************************************
+ *		NtFlushBuffersFile
+ *
+ */
+NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock )
+{
+    NTSTATUS ret;
+    SERVER_START_REQ( flush_file )
+    {
+        req->handle = hFile;
+        ret = wine_server_call( req );
+    }
+    SERVER_END_REQ;
+    return ret;
 }
Index: dlls/ntdll/ntdll.spec
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/ntdll.spec,v
retrieving revision 1.106
diff -u -u -r1.106 ntdll.spec
--- dlls/ntdll/ntdll.spec	16 Apr 2003 23:15:29 -0000	1.106
+++ dlls/ntdll/ntdll.spec	19 Apr 2003 20:01:29 -0000
@@ -107,7 +107,7 @@
 @ stdcall NtEnumerateKey (long long long long long long)
 @ stdcall NtEnumerateValueKey (long long long long long long)
 @ stub NtExtendSection
-@ stub NtFlushBuffersFile
+@ stdcall NtFlushBuffersFile(long ptr)
 @ stub NtFlushInstructionCache
 @ stdcall NtFlushKey(long)
 @ stdcall NtFlushVirtualMemory(long ptr ptr long)
@@ -441,7 +441,7 @@
 @ stdcall RtlInt64ToUnicodeString(long long long ptr)
 @ stdcall RtlIntegerToChar(long long long ptr)
 @ stdcall RtlIntegerToUnicodeString(long long ptr)
-@ stdcall RtlIsDosDeviceName_U(wstr) RtlIsDosDeviceName_U
+@ stdcall RtlIsDosDeviceName_U(wstr)
 @ stub RtlIsGenericTableEmpty
 @ stdcall RtlIsNameLegalDOS8Dot3(ptr ptr ptr)
 @ stdcall RtlIsTextUnicode(ptr long ptr)
@@ -634,7 +634,7 @@
 @ stdcall ZwEnumerateKey(long long long ptr long ptr) NtEnumerateKey
 @ stdcall ZwEnumerateValueKey(long long long ptr long ptr) NtEnumerateValueKey
 @ stub ZwExtendSection
-@ stub ZwFlushBuffersFile
+@ stdcall ZwFlushBuffersFile(long ptr) NtFlushBuffersFile
 @ stub ZwFlushInstructionCache
 @ stdcall ZwFlushKey(long) NtFlushKey
 @ stdcall ZwFlushVirtualMemory(long ptr ptr long) NtFlushVirtualMemory

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux