Author: hbelusca Date: Sun Feb 1 21:35:45 2015 New Revision: 66145
URL: http://svn.reactos.org/svn/reactos?rev=66145&view=rev Log: [FREELDR] - Code style changes (whitespace + C-style comments). - Move reactos/registry to windows/ since it's only for booting windows-like OSes that registry functions are used. - ARC hw support functions first move (i.e. another code refactoring will happen) outside of reactos/ (since they are used generally, not just for ReactOS loading). - ARC name outside of reactos/ - Delete now-useless reactos/ subdirectory.
Added: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c trunk/reactos/boot/freeldr/freeldr/arcname.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h (with props) trunk/reactos/boot/freeldr/freeldr/include/arcname.h - copied unchanged from r66136, trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/windows/registry.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/registry.c trunk/reactos/boot/freeldr/freeldr/windows/registry.h - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/include/registry.h Removed: trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/include/registry.h trunk/reactos/boot/freeldr/freeldr/reactos/ Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt trunk/reactos/boot/freeldr/freeldr/custom.c trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h trunk/reactos/boot/freeldr/freeldr/include/freeldr.h trunk/reactos/boot/freeldr/freeldr/include/winldr.h trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/options.c trunk/reactos/boot/freeldr/freeldr/oslist.c trunk/reactos/boot/freeldr/freeldr/version.c trunk/reactos/boot/freeldr/freeldr/windows/winldr.c trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMakeL... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -33,6 +33,7 @@
list(APPEND FREELDR_COMMON_SOURCE include/freeldr.h + arcname.c cmdline.c custom.c debug.c @@ -42,6 +43,7 @@ options.c oslist.c version.c + arch/archwsup.c cache/blocklist.c cache/cache.c comm/rs232.c @@ -60,9 +62,6 @@ mm/meminit.c mm/mm.c mm/heap.c - reactos/registry.c - reactos/arcname.c - reactos/archwsup.c ui/directui.c ui/gui.c ui/minitui.c @@ -75,6 +74,7 @@ video/video.c windows/conversion.c windows/peloader.c + windows/registry.c windows/winldr.c windows/wlmemory.c windows/wlregistry.c)
Copied: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/a... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -32,7 +32,7 @@ return Buffer; }
-VOID +static VOID NTAPI FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PCHAR IdentifierString) @@ -82,7 +82,7 @@ *SystemNode = FldrArcHwTreeRoot; }
-VOID +static VOID NTAPI FldrLinkToParent(IN PCONFIGURATION_COMPONENT_DATA Parent, IN PCONFIGURATION_COMPONENT_DATA Child) @@ -162,4 +162,3 @@ /* Return the child */ *ComponentKey = ComponentData; } -
Copied: trunk/reactos/boot/freeldr/freeldr/arcname.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arcnam... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arcname.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -25,20 +25,14 @@ { char *p;
- // - // Detect ramdisk path - // + /* Detect ramdisk path */ if (_strnicmp(ArcPath, "ramdisk(0)", 10) == 0) { - // - // Magic value for ramdisks - // + /* Magic value for ramdisks */ *BootDrive = 0x49; *BootPartition = 1;
- // - // Get the path - // + /* Get the path */ p = ArcPath + 11; strcpy(BootPath, p); return TRUE; @@ -51,7 +45,7 @@ if (_strnicmp(p, "fdisk(", 6) == 0) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ p = p + 6; @@ -65,7 +59,7 @@ else if (_strnicmp(p, "cdrom(", 6) == 0) { /* - * cdrom path: + * Cdrom path: * multi(0)disk(0)cdrom(x)\path */ p = p + 6; @@ -79,7 +73,7 @@ else if (_strnicmp(p, "rdisk(", 6) == 0) { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ p = p + 6; @@ -169,7 +163,7 @@ if (Disk < 0x80) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ sprintf(tmp, "fdisk(%d)", (int) Disk); @@ -178,7 +172,7 @@ else { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ sprintf(tmp, "rdisk(%d)partition(%d)", (int) (Disk - 0x80), (int) Partition); @@ -209,7 +203,7 @@ if (_strnicmp(p, "fdisk(", 6) == 0) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ p = p + 6; @@ -218,7 +212,7 @@ else if (_strnicmp(p, "rdisk(", 6) == 0) { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ p = p + 6;
Modified: trunk/reactos/boot/freeldr/freeldr/custom.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/custom... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -58,7 +58,7 @@ TRUE, NULL)) { - // The user pressed ESC + /* The user pressed ESC */ return; }
Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug.... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -395,7 +395,7 @@ BugCheckCode, BugCheckParameter1, BugCheckParameter2, BugCheckParameter3, BugCheckParameter4); UiMessageBoxCritical(Buffer); - assert(FALSE); + ASSERT(FALSE); for (;;); }
Added: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h (added) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -0,0 +1,49 @@ +/* + * FreeLoader + * + * Copyright (C) 2003 Eric Kohl + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#pragma once + +/* PROTOTYPES ***************************************************************/ + +// +// ARC Component Configuration Routines +// +VOID +NTAPI +FldrCreateSystemKey( + OUT PCONFIGURATION_COMPONENT_DATA *SystemKey +); + +VOID +NTAPI +FldrCreateComponentKey( + IN PCONFIGURATION_COMPONENT_DATA SystemKey, + IN CONFIGURATION_CLASS Class, + IN CONFIGURATION_TYPE Type, + IN IDENTIFIER_FLAG Flags, + IN ULONG Key, + IN ULONG Affinity, + IN PCHAR IdentifierString, + IN PCM_PARTIAL_RESOURCE_LIST ResourceList, + IN ULONG Size, + OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey +); + +/* EOF */
Propchange: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -15,15 +15,6 @@ #include "../../../../../armllb/inc/osloader.h" #include "../../../../../armllb/inc/machtype.h"
-// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - extern PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock; extern ULONG FirstLevelDcacheSize; extern ULONG FirstLevelDcacheFillSize;
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -25,30 +25,6 @@
#define TAG_HW_RESOURCE_LIST 'lRwH' #define TAG_HW_DISK_CONTEXT 'cDwH' - -// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - -VOID -NTAPI -FldrCreateComponentKey( - IN PCONFIGURATION_COMPONENT_DATA SystemKey, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN IDENTIFIER_FLAG Flags, - IN ULONG Key, - IN ULONG Affinity, - IN PCHAR IdentifierString, - IN PCM_PARTIAL_RESOURCE_LIST ResourceList, - IN ULONG Size, - OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey -);
/* PROTOTYPES ***************************************************************/
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -27,30 +27,6 @@ #define CONFIG_CMD(bus, dev_fn, where) \ (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
-// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - -VOID -NTAPI -FldrCreateComponentKey( - IN PCONFIGURATION_COMPONENT_DATA SystemKey, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN IDENTIFIER_FLAG Flags, - IN ULONG Key, - IN ULONG Affinity, - IN PCHAR IdentifierString, - IN PCM_PARTIAL_RESOURCE_LIST ResourceList, - IN ULONG Size, - OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey -); - /* PROTOTYPES ***************************************************************/
/* hardware.c */
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -56,6 +56,7 @@
/* Internal headers */ // #include <arcemul.h> +#include <arcname.h> #include <bytesex.h> #include <cache.h> #include <cmdline.h> @@ -75,8 +76,6 @@ #include <options.h> #include <oslist.h> #include <ramdisk.h> -#include <reactos.h> -#include <registry.h> #include <ui.h> #include <ver.h> #include <video.h> @@ -96,6 +95,7 @@ #include <ui/tui.h>
/* Arch specific includes */ +#include <arch/archwsup.h> #if defined(_M_IX86) || defined(_M_AMD64) #include <arch/pc/hardware.h> #include <arch/pc/pcbios.h>
Removed: trunk/reactos/boot/freeldr/freeldr/include/reactos.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h (removed) @@ -1,39 +0,0 @@ -/* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer brianp@sginet.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#pragma once - -/////////////////////////////////////////////////////////////////////////////////////// -// -// ARC Path Functions -// -/////////////////////////////////////////////////////////////////////////////////////// -BOOLEAN -DissectArcPath2( - IN CHAR* ArcPath, - OUT ULONG* x, - OUT ULONG* y, - OUT ULONG* z, - OUT ULONG* Partition, - OUT ULONG *PathSyntax); -BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG* BootPartition); -VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition); -#if 0 -UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath); -#endif
Removed: trunk/reactos/boot/freeldr/freeldr/include/registry.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/registry.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/registry.h (removed) @@ -1,141 +0,0 @@ -/* - * FreeLoader - registry.h - * - * Copyright (C) 2001 Eric Kohl - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __REGISTRY_H -#define __REGISTRY_H - -#define TAG_REG_NAME 'NgeR' -#define TAG_REG_KEY 'KgeR' -#define TAG_REG_KEY_DATA 'DgeR' -#define TAG_REG_VALUE 'VgeR' - -typedef struct _REG_KEY -{ - LIST_ENTRY KeyList; - LIST_ENTRY SubKeyList; - LIST_ENTRY ValueList; - - ULONG SubKeyCount; - ULONG ValueCount; - - ULONG NameSize; - PWCHAR Name; - - /* default data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; -} KEY, *FRLDRHKEY, **PFRLDRHKEY; - - -typedef struct _REG_VALUE -{ - LIST_ENTRY ValueList; - - /* value name */ - ULONG NameSize; - PWCHAR Name; - - /* value data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; -} VALUE, *PVALUE; - -#define assert(x) - -VOID -RegInitializeRegistry(VOID); - -LONG -RegInitCurrentControlSet(BOOLEAN LastKnownGood); - - -LONG -RegCreateKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - -LONG -RegDeleteKey(FRLDRHKEY Key, - PCWSTR Name); - -LONG -RegEnumKey( - _In_ FRLDRHKEY Key, - _In_ ULONG Index, - _Out_ PWCHAR Name, - _Inout_ ULONG* NameSize, - _Out_opt_ FRLDRHKEY *SubKey); - -LONG -RegOpenKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - - -LONG -RegSetValue(FRLDRHKEY Key, - PCWSTR ValueName, - ULONG Type, - PCSTR Data, - ULONG DataSize); - -LONG -RegQueryValue(FRLDRHKEY Key, - PCWSTR ValueName, - ULONG* Type, - PUCHAR Data, - ULONG* DataSize); - -LONG -RegDeleteValue(FRLDRHKEY Key, - PCWSTR ValueName); - -LONG -RegEnumValue(FRLDRHKEY Key, - ULONG Index, - PWCHAR ValueName, - ULONG* NameSize, - ULONG* Type, - PUCHAR Data, - ULONG* DataSize); - -ULONG -RegGetSubKeyCount (FRLDRHKEY Key); - -ULONG -RegGetValueCount (FRLDRHKEY Key); - - -BOOLEAN -RegImportBinaryHive (PCHAR ChunkBase, - ULONG ChunkSize); - -BOOLEAN -RegExportBinaryHive (PCWSTR KeyName, - PCHAR ChunkBase, - ULONG* ChunkSize); - - -#endif /* __REGISTRY_H */ - -/* EOF */ -
Modified: trunk/reactos/boot/freeldr/freeldr/include/winldr.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -191,4 +191,3 @@
VOID WinLdrSetProcessorContext(VOID); -
Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machin... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -45,127 +45,127 @@ VOID MachConsPutChar(int Ch) { - MachVtbl.ConsPutChar(Ch); + MachVtbl.ConsPutChar(Ch); }
BOOLEAN MachConsKbHit() { - return MachVtbl.ConsKbHit(); + return MachVtbl.ConsKbHit(); }
int MachConsGetCh() { - return MachVtbl.ConsGetCh(); + return MachVtbl.ConsGetCh(); }
VOID MachVideoClearScreen(UCHAR Attr) { - MachVtbl.VideoClearScreen(Attr); + MachVtbl.VideoClearScreen(Attr); }
VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init) { - return MachVtbl.VideoSetDisplayMode(DisplayMode, Init); + return MachVtbl.VideoSetDisplayMode(DisplayMode, Init); }
VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) { - MachVtbl.VideoGetDisplaySize(Width, Height, Depth); + MachVtbl.VideoGetDisplaySize(Width, Height, Depth); }
ULONG MachVideoGetBufferSize(VOID) { - return MachVtbl.VideoGetBufferSize(); + return MachVtbl.VideoGetBufferSize(); }
VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { - MachVtbl.VideoSetTextCursorPosition(X, Y); + MachVtbl.VideoSetTextCursorPosition(X, Y); }
VOID MachVideoHideShowTextCursor(BOOLEAN Show) { - MachVtbl.VideoHideShowTextCursor(Show); + MachVtbl.VideoHideShowTextCursor(Show); }
VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) { - MachVtbl.VideoPutChar(Ch, Attr, X, Y); + MachVtbl.VideoPutChar(Ch, Attr, X, Y); }
VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer) { - MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer); + MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer); }
BOOLEAN MachVideoIsPaletteFixed(VOID) { - return MachVtbl.VideoIsPaletteFixed(); + return MachVtbl.VideoIsPaletteFixed(); }
VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) { - MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); + MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); }
VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue) { - MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); + MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); }
VOID MachVideoSync(VOID) { - MachVtbl.VideoSync(); + MachVtbl.VideoSync(); }
VOID MachBeep(VOID) { - MachVtbl.Beep(); + MachVtbl.Beep(); }
VOID MachPrepareForReactOS(IN BOOLEAN Setup) { - MachVtbl.PrepareForReactOS(Setup); + MachVtbl.PrepareForReactOS(Setup); }
BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size) { - return MachVtbl.DiskGetBootPath(BootPath, Size); + return MachVtbl.DiskGetBootPath(BootPath, Size); }
BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { - return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); + return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); }
BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry) { - return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); + return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); }
ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber) { - return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); + return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); }
Modified: trunk/reactos/boot/freeldr/freeldr/options.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/option... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -17,8 +17,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+/* INCLUDES *******************************************************************/ + #include <freeldr.h> #include <debug.h> + +/* GLOBALS ********************************************************************/
PCSTR OptionsMenuList[] = { @@ -61,9 +65,7 @@ " +peloader\n" "NOTE: all letters must be lowercase, no spaces allowed.";
-// -// The boot options are mutually exclusive. -// +/* The boot options are mutually exclusive */ enum BootOption { NO_OPTION = 0, @@ -82,6 +84,8 @@ static BOOLEAN BootLogging = FALSE; static BOOLEAN VgaMode = FALSE; static BOOLEAN DebuggingMode = FALSE; + +/* FUNCTIONS ******************************************************************/
VOID DoOptionsMenu(VOID) { @@ -97,11 +101,11 @@ TRUE, NULL)) { - // The user pressed ESC + /* The user pressed ESC */ return; }
- // Clear the backdrop + /* Clear the backdrop */ UiDrawBackdrop();
switch (SelectedMenuItem) @@ -242,15 +246,15 @@ switch (BootOptionChoice) { case SAFE_MODE: - strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); // FIXME: NOGUIBOOT should also be specified break;
case SAFE_MODE_WITH_NETWORKING: - strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); // FIXME: NOGUIBOOT should also be specified break;
case SAFE_MODE_WITH_COMMAND_PROMPT: - strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); // FIXME: NOGUIBOOT should also be specified break;
case LAST_KNOWN_GOOD_CONFIGURATION:
Modified: trunk/reactos/boot/freeldr/freeldr/oslist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/oslist... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -17,10 +17,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+/* INCLUDES *******************************************************************/ + #include <freeldr.h>
-#define TAG_STRING ' rtS' +#define TAG_STRING ' rtS' #define TAG_OS_ITEM 'tISO' + +/* FUNCTIONS ******************************************************************/
static PCSTR CopyString(PCSTR Source) { @@ -28,11 +32,10 @@
if (!Source) return NULL; + Dest = FrLdrHeapAlloc(strlen(Source) + 1, TAG_STRING); if (Dest) - { strcpy(Dest, Source); - }
return Dest; } @@ -48,38 +51,24 @@ ULONG Count; OperatingSystemItem* Items;
- // - // Open the [FreeLoader] section - // + /* Open the [FreeLoader] section */ if (!IniOpenSection("Operating Systems", &SectionId)) - { return NULL; - }
- // - // Count number of operating systems in the section - // + /* Count number of operating systems in the section */ Count = IniGetNumSectionItems(SectionId);
- // - // Allocate memory to hold operating system lists - // + /* Allocate memory to hold operating system lists */ Items = FrLdrHeapAlloc(Count * sizeof(OperatingSystemItem), TAG_OS_ITEM); if (!Items) - { return NULL; - }
- // - // Now loop through and read the operating system section and display names - // + /* Now loop through and read the operating system section and display names */ for (Idx = 0; Idx < Count; Idx++) { IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), SettingValue, sizeof(SettingValue));
- // - // Search start and end of the title - // + /* Search start and end of the title */ OsLoadOptions = NULL; TitleStart = SettingValue; while (*TitleStart == ' ' || *TitleStart == '"') @@ -95,17 +84,13 @@ OsLoadOptions = TitleEnd + 1; }
- // - // Copy the system partition, identifier and options - // + /* Copy the system partition, identifier and options */ Items[Idx].SystemPartition = CopyString(SettingName); Items[Idx].LoadIdentifier = CopyString(TitleStart); Items[Idx].OsLoadOptions = CopyString(OsLoadOptions); }
- // - // Return success - // + /* Return success */ *OperatingSystemCountPointer = Count; return Items; }
Modified: trunk/reactos/boot/freeldr/freeldr/version.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/versio... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/version.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/version.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -19,7 +19,7 @@
#include <freeldr.h>
-CHAR FreeLoaderVersionString[80]; +CHAR FreeLoaderVersionString[80];
PCHAR GetFreeLoaderVersionString(VOID) {
Copied: trunk/reactos/boot/freeldr/freeldr/windows/registry.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/registry.c) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/registry.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/registry.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -20,8 +20,9 @@
#include <freeldr.h> #include <cmlib.h> +#include "registry.h" + #include <debug.h> - DBG_DEFAULT_CHANNEL(REGISTRY);
static PCMHIVE CmHive; @@ -70,7 +71,6 @@ { /* Nothing to do */ } -
LONG RegInitCurrentControlSet( @@ -530,7 +530,6 @@ return ERROR_INVALID_PARAMETER; }
- LONG RegEnumValue( _In_ FRLDRHKEY Key,
Copied: trunk/reactos/boot/freeldr/freeldr/windows/registry.h (from r66136, trunk/reactos/boot/freeldr/freeldr/include/registry.h) URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/registry.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/registry.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -28,54 +28,42 @@
typedef struct _REG_KEY { - LIST_ENTRY KeyList; - LIST_ENTRY SubKeyList; - LIST_ENTRY ValueList; + LIST_ENTRY KeyList; + LIST_ENTRY SubKeyList; + LIST_ENTRY ValueList;
- ULONG SubKeyCount; - ULONG ValueCount; + ULONG SubKeyCount; + ULONG ValueCount;
- ULONG NameSize; - PWCHAR Name; + ULONG NameSize; + PWCHAR Name;
- /* default data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; + /* Default data */ + ULONG DataType; + ULONG DataSize; + PCHAR Data; } KEY, *FRLDRHKEY, **PFRLDRHKEY;
typedef struct _REG_VALUE { - LIST_ENTRY ValueList; + LIST_ENTRY ValueList;
- /* value name */ - ULONG NameSize; - PWCHAR Name; + /* Value name */ + ULONG NameSize; + PWCHAR Name;
- /* value data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; + /* Value data */ + ULONG DataType; + ULONG DataSize; + PCHAR Data; } VALUE, *PVALUE; - -#define assert(x)
VOID RegInitializeRegistry(VOID);
LONG RegInitCurrentControlSet(BOOLEAN LastKnownGood); - - -LONG -RegCreateKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - -LONG -RegDeleteKey(FRLDRHKEY Key, - PCWSTR Name);
LONG RegEnumKey( @@ -87,9 +75,8 @@
LONG RegOpenKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - + PCWSTR KeyName, + PFRLDRHKEY Key);
LONG RegSetValue(FRLDRHKEY Key, @@ -138,4 +125,3 @@ #endif /* __REGISTRY_H */
/* EOF */ -
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -20,10 +20,11 @@ */
#include <freeldr.h> +#include "registry.h"
#include <ndk/ldrtypes.h> + #include <debug.h> - DBG_DEFAULT_CHANNEL(WINDOWS);
//FIXME: Find a better way to retrieve ARC disk information
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -9,8 +9,9 @@ /* INCLUDES ***************************************************************/
#include <freeldr.h> +#include "registry.h" + #include <debug.h> - DBG_DEFAULT_CHANNEL(WINDOWS);
// The only global var here, used to mark mem pages as NLS in WinLdrSetupMemoryLayout() @@ -278,7 +279,6 @@
return TRUE; } -
BOOLEAN WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,