Author: gedmurphy Date: Tue May 22 03:12:16 2007 New Revision: 26861
URL: http://svn.reactos.org/svn/reactos?rev=26861&view=rev Log: - fix the release build for Colin. - clean up formatting of a file I was playing with.
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c trunk/reactos/boot/freeldr/freeldr/include/debug.h
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c Tue May 22 03:12:16 2007 @@ -19,8 +19,6 @@ */
#include <freeldr.h> - -#define NDEBUG #include <debug.h>
BOOLEAN AcpiPresent = FALSE; @@ -28,49 +26,49 @@ static BOOLEAN FindAcpiBios(VOID) { - PUCHAR Ptr; + PUCHAR Ptr;
- /* Find the 'Root System Descriptor Table Pointer' */ - Ptr = (PUCHAR)0xE0000; - while ((ULONG)Ptr < 0x100000) + /* Find the 'Root System Descriptor Table Pointer' */ + Ptr = (PUCHAR)0xE0000; + while ((ULONG)Ptr < 0x100000) { - if (!memcmp(Ptr, "RSD PTR ", 8)) - { - DbgPrint((DPRINT_HWDETECT, "ACPI supported\n")); + if (!memcmp(Ptr, "RSD PTR ", 8)) + { + DbgPrint((DPRINT_HWDETECT, "ACPI supported\n"));
- return TRUE; - } + return TRUE; + }
- Ptr = (PUCHAR)((ULONG)Ptr + 0x10); + Ptr = (PUCHAR)((ULONG)Ptr + 0x10); }
- DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n")); + DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n"));
- return FALSE; + return FALSE; }
VOID DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { - WCHAR Buffer[80]; - FRLDRHKEY BiosKey; - LONG Error; + WCHAR Buffer[80]; + FRLDRHKEY BiosKey; + LONG Error;
- if (FindAcpiBios()) + if (FindAcpiBios()) { - AcpiPresent = TRUE; - /* Create new bus key */ - swprintf(Buffer, - L"MultifunctionAdapter\%u", *BusNumber); - Error = RegCreateKey(SystemKey, - Buffer, - &BiosKey); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error)); - return; - } + AcpiPresent = TRUE; + /* Create new bus key */ + swprintf(Buffer, + L"MultifunctionAdapter\%u", *BusNumber); + Error = RegCreateKey(SystemKey, + Buffer, + &BiosKey); + if (Error != ERROR_SUCCESS) + { + DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error)); + return; + }
#if 0 /* Set 'Component Information' */ @@ -80,20 +78,20 @@ 0xFFFFFFFF); #endif
- /* Increment bus number */ - (*BusNumber)++; + /* Increment bus number */ + (*BusNumber)++;
- /* Set 'Identifier' value */ - Error = RegSetValue(BiosKey, - L"Identifier", - REG_SZ, - (PCHAR)L"ACPI BIOS", - 10 * sizeof(WCHAR)); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); - return; - } + /* Set 'Identifier' value */ + Error = RegSetValue(BiosKey, + L"Identifier", + REG_SZ, + (PCHAR)L"ACPI BIOS", + 10 * sizeof(WCHAR)); + if (Error != ERROR_SUCCESS) + { + DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); + return; + }
} }
Modified: trunk/reactos/boot/freeldr/freeldr/include/debug.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/debug.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/debug.h Tue May 22 03:12:16 2007 @@ -35,15 +35,16 @@ #define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages #define DPRINT_WINDOWS 0x00000800 // OR this with DebugPrintMask to enable messages from Windows loader
+VOID DebugPrint(ULONG Mask, char *format, ...); + #ifdef DBG
VOID DebugInit(VOID); - VOID DebugPrint(ULONG Mask, char *format, ...); VOID DebugPrint1(char *format, ...); VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
#define DbgPrint(_x_) DebugPrint _x_ ; - #define DPRINT1 DebugPrint1 + #define DPRINT1 DebugPrint1 #define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); } #define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
@@ -77,7 +78,7 @@ #else
#define DebugInit() - #define DbgPrint(_x_) { if (0) DebugPrint _x_; } + #define DbgPrint(_x_) { if (0) DebugPrint _x_; } #define DPRINT1(_x_) { if (0) printf _x_; } #define BugCheck(_x_) #define DbgDumpBuffer(_x_, _y_, _z_)