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/CJournaledTest... ============================================================================== --- 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;