* PROJECT: ReactOS kernel
* FILE: ntoskrnl/inbv/inbv.c
* PURPOSE: Boot video support
- *
+ *
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
*/
/* INCLUDES ******************************************************************/
#include <ntoskrnl.h>
-#include <ntos/bootvid.h>
-#include <ddk/ntbootvid.h>
+#include "../../drivers/base/bootvid/ntbootvid.h"
#define NDEBUG
#include <internal/debug.h>
+#if defined (ALLOC_PRAGMA)
+#pragma alloc_text(INIT, InbvEnableBootDriver)
+#endif
+
/* GLOBALS *******************************************************************/
{
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING BootVidName;
+ UNICODE_STRING BootVidName = RTL_CONSTANT_STRING(L"\\Device\\BootVid");
- RtlRosInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid");
InitializeObjectAttributes(&ObjectAttributes,
&BootVidName,
0,
return(STATUS_SUCCESS);
}
+
VOID
STDCALL
InbvAcquireDisplayOwnership(VOID)
{
}
-
BOOLEAN
STDCALL
InbvCheckDisplayOwnership(VOID)
return FALSE;
}
-
BOOLEAN
STDCALL
InbvDisplayString(IN PCHAR String)
{
- return FALSE;
+ /* Call Bootvid (we don't support bootvid for now)
+ * vidDisplayString(String);
+ * so instead, we'll fall-back to HAL
+ */
+ HalDisplayString(String);
+
+ /* Call Headless (We don't support headless for now)
+ HeadlessDispatch(DISPLAY_STRING);
+ */
+
+ /* Return success */
+ return TRUE;
}
BOOLEAN
return(InbvResetDisplay());
}
+
VOID
STDCALL INIT_FUNCTION
InbvEnableBootDriver(IN BOOLEAN Enable)
/* Notify the hal we will acquire the display. */
HalAcquireDisplayOwnership(InbvResetDisplayParameters);
- Status = NtDeviceIoControlFile(BootVidDevice,
+ Status = ZwDeviceIoControlFile(BootVidDevice,
NULL,
NULL,
NULL,
}
else
{
- Status = NtDeviceIoControlFile(BootVidDevice,
+ Status = ZwDeviceIoControlFile(BootVidDevice,
NULL,
NULL,
NULL,
BootVidDriverInstalled = FALSE;
/* Notify the hal we have released the display. */
HalReleaseDisplayOwnership();
-
- NtClose(BootVidDevice);
- BootVidDevice = NULL;
}
+
+ ZwClose(BootVidDevice);
+ BootVidDevice = NULL;
}
+
BOOLEAN
STDCALL
InbvEnableDisplayString(IN BOOLEAN Enable)
STDCALL
NtDisplayString(IN PUNICODE_STRING DisplayString)
{
- ANSI_STRING AnsiString;
-
- RtlUnicodeStringToAnsiString (&AnsiString, DisplayString, TRUE);
-
- HalDisplayString (AnsiString.Buffer);
+ OEM_STRING OemString;
- RtlFreeAnsiString (&AnsiString);
+ RtlUnicodeStringToOemString(&OemString, DisplayString, TRUE);
+ HalDisplayString(OemString.Buffer);
+ RtlFreeOemString(&OemString);
- return(STATUS_SUCCESS);
+ return STATUS_SUCCESS;
}