Author: ekohl
Date: Mon Jan 20 21:32:49 2014
New Revision: 61742
URL:
http://svn.reactos.org/svn/reactos?rev=61742&view=rev
Log:
[EVENTLOG]
LogfClearFile: Write the backup file and add status checks.
Modified:
trunk/reactos/base/services/eventlog/file.c
Modified: trunk/reactos/base/services/eventlog/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/fil…
==============================================================================
--- trunk/reactos/base/services/eventlog/file.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/eventlog/file.c [iso-8859-1] Mon Jan 20 21:32:49 2014
@@ -1099,18 +1099,31 @@
LogfClearFile(PLOGFILE LogFile,
PUNICODE_STRING BackupFileName)
{
+ NTSTATUS Status;
+
RtlAcquireResourceExclusive(&LogFile->Lock, TRUE);
if (BackupFileName->Length > 0)
{
- /* FIXME: Write a backup file */
- }
-
- LogfInitializeNew(LogFile);
+ /* Write a backup file */
+ Status = LogfBackupFile(LogFile,
+ BackupFileName);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("LogfBackupFile failed (Status: 0x%08lx)\n", Status);
+ return Status;
+ }
+ }
+
+ Status = LogfInitializeNew(LogFile);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("LogfInitializeNew failed (Status: 0x%08lx)\n", Status);
+ }
RtlReleaseResource(&LogFile->Lock);
- return STATUS_SUCCESS;
+ return Status;
}