[FREELDR] Minor code style - use RtlZeroMemory(); shorter member name; use different debug channel.

This commit is contained in:
Hermès Bélusca-Maïto 2019-09-13 14:35:16 +02:00
parent eeff926ede
commit a9411fb658
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 7 additions and 7 deletions

View file

@ -22,7 +22,7 @@
#include <freeldr.h>
#include <debug.h>
DBG_DEFAULT_CHANNEL(INIFILE);
DBG_DEFAULT_CHANNEL(WARNING);
/* GLOBALS ********************************************************************/

View file

@ -15,7 +15,7 @@
typedef struct tagCMDLINEINFO
{
PCSTR DebugString;
PCSTR DefaultOperatingSystem;
PCSTR DefaultOs;
LONG TimeOut;
} CMDLINEINFO, *PCMDLINEINFO;
@ -33,7 +33,7 @@ CmdLineParse(IN PCSTR CmdLine)
/* Set defaults */
CmdLineInfo.DebugString = NULL;
CmdLineInfo.DefaultOperatingSystem = NULL;
CmdLineInfo.DefaultOs = NULL;
CmdLineInfo.TimeOut = -1;
/*
@ -84,7 +84,7 @@ CmdLineParse(IN PCSTR CmdLine)
/* Copy the default OS */
RtlStringCbCopyNA(DefaultOs, sizeof(DefaultOs), Setting, Length);
CmdLineInfo.DefaultOperatingSystem = DefaultOs;
CmdLineInfo.DefaultOs = DefaultOs;
}
/* Get ramdisk base address */
@ -128,7 +128,7 @@ CmdLineGetDebugString(VOID)
PCSTR
CmdLineGetDefaultOS(VOID)
{
return CmdLineInfo.DefaultOperatingSystem;
return CmdLineInfo.DefaultOs;
}
LONG

View file

@ -914,8 +914,8 @@ LoadAndBootWindowsCommon(
TRACE("Hello from paged mode, KiSystemStartup %p, LoaderBlockVA %p!\n",
KiSystemStartup, LoaderBlockVA);
// Zero KI_USER_SHARED_DATA page
memset((PVOID)KI_USER_SHARED_DATA, 0, MM_PAGE_SIZE);
/* Zero KI_USER_SHARED_DATA page */
RtlZeroMemory((PVOID)KI_USER_SHARED_DATA, MM_PAGE_SIZE);
WinLdrpDumpMemoryDescriptors(LoaderBlockVA);
WinLdrpDumpBootDriver(LoaderBlockVA);