[HALX86][HALARM] Minor formatting to HalInitSystem

Add CODE_SEG("INIT"), SAL2 annotations, remove extra-parenthesis...
This commit is contained in:
Hermès Bélusca-Maïto 2023-11-22 20:28:52 +01:00
parent 1890ad20f8
commit b0dd4ba09c
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 26 additions and 21 deletions

View file

@ -16,20 +16,21 @@
/* PRIVATE FUNCTIONS **********************************************************/
static
CODE_SEG("INIT")
VOID
NTAPI
HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
HalpGetParameters(
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PCHAR CommandLine;
/* Make sure we have a loader block and command line */
if ((LoaderBlock) && (LoaderBlock->LoadOptions))
if (LoaderBlock && LoaderBlock->LoadOptions)
{
/* Read the command line */
CommandLine = LoaderBlock->LoadOptions;
PCSTR CommandLine = LoaderBlock->LoadOptions;
/* Check for initial breakpoint */
if (strstr(CommandLine, "BREAK")) DbgBreakPoint();
if (strstr(CommandLine, "BREAK"))
DbgBreakPoint();
}
}
@ -38,15 +39,17 @@ HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/*
* @implemented
*/
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalInitSystem(IN ULONG BootPhase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
HalInitSystem(
_In_ ULONG BootPhase,
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PKPRCB Prcb = KeGetCurrentPrcb();
/* Check the boot phase */
if (!BootPhase)
if (BootPhase == 0)
{
/* Get command-line parameters */
HalpGetParameters(LoaderBlock);

View file

@ -18,24 +18,25 @@ BOOLEAN HalpPciLockSettings;
/* PRIVATE FUNCTIONS *********************************************************/
static
CODE_SEG("INIT")
VOID
NTAPI
HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
HalpGetParameters(
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PCHAR CommandLine;
/* Make sure we have a loader block and command line */
if ((LoaderBlock) && (LoaderBlock->LoadOptions))
if (LoaderBlock && LoaderBlock->LoadOptions)
{
/* Read the command line */
CommandLine = LoaderBlock->LoadOptions;
PCSTR CommandLine = LoaderBlock->LoadOptions;
/* Check if PCI is locked */
if (strstr(CommandLine, "PCILOCK")) HalpPciLockSettings = TRUE;
if (strstr(CommandLine, "PCILOCK"))
HalpPciLockSettings = TRUE;
/* Check for initial breakpoint */
if (strstr(CommandLine, "BREAK")) DbgBreakPoint();
if (strstr(CommandLine, "BREAK"))
DbgBreakPoint();
}
}
@ -70,8 +71,9 @@ HalInitializeProcessor(
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalInitSystem(IN ULONG BootPhase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
HalInitSystem(
_In_ ULONG BootPhase,
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PKPRCB Prcb = KeGetCurrentPrcb();
NTSTATUS Status;
@ -79,7 +81,7 @@ HalInitSystem(IN ULONG BootPhase,
/* Check the boot phase */
if (BootPhase == 0)
{
/* Phase 0... save bus type */
/* Save bus type */
HalpBusType = LoaderBlock->u.I386.MachineType & 0xFF;
/* Get command-line parameters */