mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:IO] IopDisplayLoadingMessage(): Display the loading messages only in SOS mode.
- Make the boolean SosEnabled from ex/init.c visible globally so that it can be checked against by IopDisplayLoadingMessage(). - Also use RtlString* function to construct the string.
This commit is contained in:
parent
17c59456cd
commit
d1b3115afa
2 changed files with 13 additions and 12 deletions
|
@ -70,6 +70,7 @@ BOOLEAN ExpInTextModeSetup;
|
||||||
BOOLEAN IoRemoteBootClient;
|
BOOLEAN IoRemoteBootClient;
|
||||||
ULONG InitSafeBootMode;
|
ULONG InitSafeBootMode;
|
||||||
BOOLEAN InitIsWinPEMode, InitWinPEModeType;
|
BOOLEAN InitIsWinPEMode, InitWinPEModeType;
|
||||||
|
BOOLEAN SosEnabled; // Used by driver.c!IopDisplayLoadingMessage()
|
||||||
|
|
||||||
/* NT Boot Path */
|
/* NT Boot Path */
|
||||||
UNICODE_STRING NtSystemRoot;
|
UNICODE_STRING NtSystemRoot;
|
||||||
|
@ -1344,7 +1345,7 @@ Phase1InitializationDiscard(IN PVOID Context)
|
||||||
NTSTATUS Status, MsgStatus;
|
NTSTATUS Status, MsgStatus;
|
||||||
TIME_FIELDS TimeFields;
|
TIME_FIELDS TimeFields;
|
||||||
LARGE_INTEGER SystemBootTime, UniversalBootTime, OldTime, Timeout;
|
LARGE_INTEGER SystemBootTime, UniversalBootTime, OldTime, Timeout;
|
||||||
BOOLEAN SosEnabled, NoGuiBoot, ResetBias = FALSE, AlternateShell = FALSE;
|
BOOLEAN NoGuiBoot, ResetBias = FALSE, AlternateShell = FALSE;
|
||||||
PLDR_DATA_TABLE_ENTRY NtosEntry;
|
PLDR_DATA_TABLE_ENTRY NtosEntry;
|
||||||
PMESSAGE_RESOURCE_ENTRY MsgEntry;
|
PMESSAGE_RESOURCE_ENTRY MsgEntry;
|
||||||
PCHAR CommandLine, Y2KHackRequired, SafeBoot, Environment;
|
PCHAR CommandLine, Y2KHackRequired, SafeBoot, Environment;
|
||||||
|
|
|
@ -33,7 +33,6 @@ static const WCHAR ServicesKeyName[] = L"\\Registry\\Machine\\System\\CurrentCon
|
||||||
|
|
||||||
POBJECT_TYPE IoDriverObjectType = NULL;
|
POBJECT_TYPE IoDriverObjectType = NULL;
|
||||||
|
|
||||||
extern BOOLEAN ExpInTextModeSetup;
|
|
||||||
extern BOOLEAN PnpSystemInit;
|
extern BOOLEAN PnpSystemInit;
|
||||||
extern BOOLEAN PnPBootDriversLoaded;
|
extern BOOLEAN PnPBootDriversLoaded;
|
||||||
extern KEVENT PiEnumerationFinished;
|
extern KEVENT PiEnumerationFinished;
|
||||||
|
@ -305,25 +304,26 @@ IopSuffixUnicodeString(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Displays a driver loading message on the screen.
|
* @brief Displays a driver-loading message in SOS mode.
|
||||||
**/
|
**/
|
||||||
static VOID
|
static VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IopDisplayLoadingMessage(
|
IopDisplayLoadingMessage(
|
||||||
_In_ PUNICODE_STRING ServiceName)
|
_In_ PUNICODE_STRING ServiceName)
|
||||||
{
|
{
|
||||||
|
extern BOOLEAN SosEnabled; // See ex/init.c
|
||||||
static const UNICODE_STRING DotSys = RTL_CONSTANT_STRING(L".SYS");
|
static const UNICODE_STRING DotSys = RTL_CONSTANT_STRING(L".SYS");
|
||||||
CHAR TextBuffer[256];
|
CHAR TextBuffer[256];
|
||||||
|
|
||||||
if (ExpInTextModeSetup) return;
|
if (!SosEnabled) return;
|
||||||
if (!KeLoaderBlock) return;
|
if (!KeLoaderBlock) return;
|
||||||
RtlUpcaseUnicodeString(ServiceName, ServiceName, FALSE);
|
RtlUpcaseUnicodeString(ServiceName, ServiceName, FALSE);
|
||||||
snprintf(TextBuffer, sizeof(TextBuffer),
|
RtlStringCbPrintfA(TextBuffer, sizeof(TextBuffer),
|
||||||
"%s%sSystem32\\Drivers\\%wZ%s\r\n",
|
"%s%sSystem32\\Drivers\\%wZ%s\r\n",
|
||||||
KeLoaderBlock->ArcBootDeviceName,
|
KeLoaderBlock->ArcBootDeviceName,
|
||||||
KeLoaderBlock->NtBootPathName,
|
KeLoaderBlock->NtBootPathName,
|
||||||
ServiceName,
|
ServiceName,
|
||||||
IopSuffixUnicodeString(&DotSys, ServiceName) ? "" : ".SYS");
|
IopSuffixUnicodeString(&DotSys, ServiceName) ? "" : ".SYS");
|
||||||
HalDisplayString(TextBuffer);
|
HalDisplayString(TextBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1196,8 +1196,8 @@ IopInitializeSystemDrivers(VOID)
|
||||||
|
|
||||||
PiPerformSyncDeviceAction(IopRootDeviceNode->PhysicalDeviceObject, PiActionEnumDeviceTree);
|
PiPerformSyncDeviceAction(IopRootDeviceNode->PhysicalDeviceObject, PiActionEnumDeviceTree);
|
||||||
|
|
||||||
/* No system drivers on the boot cd */
|
/* HACK: No system drivers on the BootCD */
|
||||||
if (KeLoaderBlock->SetupLdrBlock) return; // ExpInTextModeSetup
|
if (KeLoaderBlock->SetupLdrBlock) return;
|
||||||
|
|
||||||
/* Get the driver list */
|
/* Get the driver list */
|
||||||
SavedList = DriverList = CmGetSystemDriverList();
|
SavedList = DriverList = CmGetSystemDriverList();
|
||||||
|
|
Loading…
Reference in a new issue