[EVENTLOG]

LogfClearFile: Write the backup file and add status checks. 

svn path=/trunk/; revision=61742
This commit is contained in:
Eric Kohl 2014-01-20 21:32:49 +00:00
parent c3cdc1abae
commit 5192d67c43

View file

@ -1099,18 +1099,31 @@ NTSTATUS
LogfClearFile(PLOGFILE LogFile, LogfClearFile(PLOGFILE LogFile,
PUNICODE_STRING BackupFileName) PUNICODE_STRING BackupFileName)
{ {
NTSTATUS Status;
RtlAcquireResourceExclusive(&LogFile->Lock, TRUE); RtlAcquireResourceExclusive(&LogFile->Lock, TRUE);
if (BackupFileName->Length > 0) if (BackupFileName->Length > 0)
{ {
/* FIXME: Write a backup file */ /* Write a backup file */
Status = LogfBackupFile(LogFile,
BackupFileName);
if (!NT_SUCCESS(Status))
{
DPRINT1("LogfBackupFile failed (Status: 0x%08lx)\n", Status);
return Status;
}
} }
LogfInitializeNew(LogFile); Status = LogfInitializeNew(LogFile);
if (!NT_SUCCESS(Status))
{
DPRINT1("LogfInitializeNew failed (Status: 0x%08lx)\n", Status);
}
RtlReleaseResource(&LogFile->Lock); RtlReleaseResource(&LogFile->Lock);
return STATUS_SUCCESS; return Status;
} }