Author: fireball
Date: Thu May 18 00:34:34 2006
New Revision: 21927
URL:
http://svn.reactos.ru/svn/reactos?rev=21927&view=rev
Log:
[AUDIT]
ntoskrnl/inbv
- Functions are written mostly by dwelch and chorn, are exported and don't look like
containing dirty code. They have some comments too. Filip confirmes this file is clean.
- Unified formatting throughout the file
Modified:
trunk/reactos/ntoskrnl/inbv/inbv.c (contents, props changed)
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=21…
==============================================================================
--- trunk/reactos/ntoskrnl/inbv/inbv.c (original)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c Thu May 18 00:34:34 2006
@@ -23,9 +23,7 @@
NTHALAPI
VOID
NTAPI
-HalReleaseDisplayOwnership(
- VOID
-);
+HalReleaseDisplayOwnership(VOID);
/* GLOBALS *******************************************************************/
@@ -41,31 +39,31 @@
STATIC
InbvCheckBootVid(VOID)
{
- IO_STATUS_BLOCK Iosb;
-
- if (BootVidDevice == NULL)
- {
- NTSTATUS Status;
- OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING BootVidName = RTL_CONSTANT_STRING(L"\\Device\\BootVid");
-
- InitializeObjectAttributes(&ObjectAttributes,
- &BootVidName,
- 0,
- NULL,
- NULL);
- Status = ZwOpenFile(&BootVidDevice,
- FILE_ALL_ACCESS,
- &ObjectAttributes,
- &Iosb,
- 0,
- 0);
- if (!NT_SUCCESS(Status))
- {
- return(Status);
- }
- }
- return(STATUS_SUCCESS);
+ IO_STATUS_BLOCK Iosb;
+
+ if (BootVidDevice == NULL)
+ {
+ NTSTATUS Status;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING BootVidName =
RTL_CONSTANT_STRING(L"\\Device\\BootVid");
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &BootVidName,
+ 0,
+ NULL,
+ NULL);
+ Status = ZwOpenFile(&BootVidDevice,
+ FILE_ALL_ACCESS,
+ &ObjectAttributes,
+ &Iosb,
+ 0,
+ 0);
+ if (!NT_SUCCESS(Status))
+ {
+ return(Status);
+ }
+ }
+ return(STATUS_SUCCESS);
}
@@ -79,7 +77,7 @@
STDCALL
InbvCheckDisplayOwnership(VOID)
{
- return FALSE;
+ return FALSE;
}
BOOLEAN
@@ -90,82 +88,84 @@
* 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
-STDCALL
-InbvResetDisplayParameters(ULONG SizeX, ULONG SizeY)
-{
- return(InbvResetDisplay());
-}
-
-
-VOID
-STDCALL INIT_FUNCTION
+ HalDisplayString(String);
+
+ /* Call Headless (We don't support headless for now)
+ HeadlessDispatch(DISPLAY_STRING);
+ */
+
+ /* Return success */
+ return TRUE;
+}
+
+BOOLEAN
+STDCALL
+InbvResetDisplayParameters(ULONG SizeX,
+ ULONG SizeY)
+{
+ return(InbvResetDisplay());
+}
+
+
+VOID
+STDCALL
+INIT_FUNCTION
InbvEnableBootDriver(IN BOOLEAN Enable)
{
- NTSTATUS Status;
- IO_STATUS_BLOCK Iosb;
-
- Status = InbvCheckBootVid();
- if (!NT_SUCCESS(Status))
- {
- return;
- }
-
- if (Enable)
- {
- /* Notify the hal we will acquire the display. */
- HalAcquireDisplayOwnership(InbvResetDisplayParameters);
-
- Status = ZwDeviceIoControlFile(BootVidDevice,
- NULL,
- NULL,
- NULL,
- &Iosb,
- IOCTL_BOOTVID_INITIALIZE,
- NULL,
- 0,
- &BootVidFunctionTable,
- sizeof(BootVidFunctionTable));
- if (!NT_SUCCESS(Status))
- {
- KEBUGCHECK(0);
- }
- BootVidDriverInstalled = TRUE;
- CHECKPOINT;
- }
- else
- {
- Status = ZwDeviceIoControlFile(BootVidDevice,
- NULL,
- NULL,
- NULL,
- &Iosb,
- IOCTL_BOOTVID_CLEANUP,
- NULL,
- 0,
- NULL,
- 0);
- if (!NT_SUCCESS(Status))
- {
- KEBUGCHECK(0);
- }
- BootVidDriverInstalled = FALSE;
- /* Notify the hal we have released the display. */
- HalReleaseDisplayOwnership();
- }
-
- ZwClose(BootVidDevice);
- BootVidDevice = NULL;
+ NTSTATUS Status;
+ IO_STATUS_BLOCK Iosb;
+
+ Status = InbvCheckBootVid();
+ if (!NT_SUCCESS(Status))
+ {
+ return;
+ }
+
+ if (Enable)
+ {
+ /* Notify the hal we will acquire the display. */
+ HalAcquireDisplayOwnership(InbvResetDisplayParameters);
+
+ Status = ZwDeviceIoControlFile(BootVidDevice,
+ NULL,
+ NULL,
+ NULL,
+ &Iosb,
+ IOCTL_BOOTVID_INITIALIZE,
+ NULL,
+ 0,
+ &BootVidFunctionTable,
+ sizeof(BootVidFunctionTable));
+ if (!NT_SUCCESS(Status))
+ {
+ KEBUGCHECK(0);
+ }
+ BootVidDriverInstalled = TRUE;
+ CHECKPOINT;
+ }
+ else
+ {
+ Status = ZwDeviceIoControlFile(BootVidDevice,
+ NULL,
+ NULL,
+ NULL,
+ &Iosb,
+ IOCTL_BOOTVID_CLEANUP,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ if (!NT_SUCCESS(Status))
+ {
+ KEBUGCHECK(0);
+ }
+ BootVidDriverInstalled = FALSE;
+ /* Notify the hal we have released the display. */
+ HalReleaseDisplayOwnership();
+ }
+
+ ZwClose(BootVidDevice);
+ BootVidDevice = NULL;
}
@@ -173,7 +173,7 @@
STDCALL
InbvEnableDisplayString(IN BOOLEAN Enable)
{
- return FALSE;
+ return FALSE;
}
@@ -188,7 +188,7 @@
STDCALL
InbvIsBootDriverInstalled(VOID)
{
- return(BootVidDriverInstalled);
+ return(BootVidDriverInstalled);
}
@@ -203,20 +203,20 @@
STDCALL
InbvResetDisplay(VOID)
{
- if (!BootVidDriverInstalled)
- {
- return(FALSE);
- }
- return(BootVidFunctionTable.ResetDisplay());
+ if (!BootVidDriverInstalled)
+ {
+ return(FALSE);
+ }
+ return(BootVidFunctionTable.ResetDisplay());
}
VOID
STDCALL
InbvSetScrollRegion(IN ULONG Left,
- IN ULONG Top,
- IN ULONG Width,
- IN ULONG Height)
+ IN ULONG Top,
+ IN ULONG Width,
+ IN ULONG Height)
{
}
@@ -231,10 +231,10 @@
VOID
STDCALL
InbvSolidColorFill(IN ULONG Left,
- IN ULONG Top,
- IN ULONG Width,
- IN ULONG Height,
- IN ULONG Color)
+ IN ULONG Top,
+ IN ULONG Width,
+ IN ULONG Height,
+ IN ULONG Color)
{
}
@@ -242,11 +242,11 @@
STDCALL
NtDisplayString(IN PUNICODE_STRING DisplayString)
{
- OEM_STRING OemString;
-
- RtlUnicodeStringToOemString(&OemString, DisplayString, TRUE);
- HalDisplayString(OemString.Buffer);
- RtlFreeOemString(&OemString);
-
- return STATUS_SUCCESS;
-}
+ OEM_STRING OemString;
+
+ RtlUnicodeStringToOemString(&OemString, DisplayString, TRUE);
+ HalDisplayString(OemString.Buffer);
+ RtlFreeOemString(&OemString);
+
+ return STATUS_SUCCESS;
+}
Propchange: trunk/reactos/ntoskrnl/inbv/inbv.c
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable (removed)
@@ -1,1 +1,0 @@
-*
Propchange: trunk/reactos/ntoskrnl/inbv/inbv.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*