[ros-diffs] [cgutman] 55933: [ROSAUTOTEST] - Flush file buffers after writing to the crash recovery journal

cgutman at svn.reactos.org cgutman at svn.reactos.org
Wed Feb 29 19:44:44 UTC 2012


Author: cgutman
Date: Wed Feb 29 19:44:44 2012
New Revision: 55933

URL: http://svn.reactos.org/svn/reactos?rev=55933&view=rev
Log:
[ROSAUTOTEST]
- Flush file buffers after writing to the crash recovery journal

Modified:
    trunk/rostests/rosautotest/CJournaledTestList.cpp

Modified: trunk/rostests/rosautotest/CJournaledTestList.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/CJournaledTestList.cpp?rev=55933&r1=55932&r2=55933&view=diff
==============================================================================
--- trunk/rostests/rosautotest/CJournaledTestList.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/CJournaledTestList.cpp [iso-8859-1] Wed Feb 29 19:44:44 2012
@@ -83,6 +83,7 @@
 {
     DWORD BytesWritten;
     WriteFile(m_hJournal, String.c_str(), String.size() + 1, &BytesWritten, NULL);
+    FlushFileBuffers(m_hJournal);
 }
 
 /**
@@ -98,6 +99,7 @@
 {
     DWORD BytesWritten;
     WriteFile(m_hJournal, String.c_str(), (String.size() + 1) * sizeof(WCHAR), &BytesWritten, NULL);
+    FlushFileBuffers(m_hJournal);
 }
 
 /**
@@ -169,6 +171,7 @@
     }
 
     WriteFile(m_hJournal, &TerminatingNull, sizeof(TerminatingNull), &BytesWritten, NULL);
+    FlushFileBuffers(m_hJournal);
 
     CloseHandle(m_hJournal);
     m_hJournal = INVALID_HANDLE_VALUE;
@@ -248,6 +251,7 @@
     SetFilePointer(m_hJournal, sizeof(szJournalHeader), NULL, FILE_CURRENT);
 
     WriteFile(m_hJournal, &m_ListIterator, sizeof(m_ListIterator), &BytesWritten, NULL);
+    FlushFileBuffers(m_hJournal);
 
     CloseHandle(m_hJournal);
     m_hJournal = NULL;




More information about the Ros-diffs mailing list