mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 20:43:18 +00:00
[EVENTLOG]
LogfClearFile: Write the backup file and add status checks. svn path=/trunk/; revision=61742
This commit is contained in:
parent
c3cdc1abae
commit
5192d67c43
1 changed files with 16 additions and 3 deletions
|
@ -1099,18 +1099,31 @@ NTSTATUS
|
|||
LogfClearFile(PLOGFILE LogFile,
|
||||
PUNICODE_STRING BackupFileName)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
RtlAcquireResourceExclusive(&LogFile->Lock, TRUE);
|
||||
|
||||
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);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue