[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 <freeldr.h>
#include <debug.h> #include <debug.h>
DBG_DEFAULT_CHANNEL(INIFILE); DBG_DEFAULT_CHANNEL(WARNING);
/* GLOBALS ********************************************************************/ /* GLOBALS ********************************************************************/

View file

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

View file

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