Fix a couple of problems with FreeLDR portability.
[reactos.git] / reactos / boot / freeldr / freeldr / machine.c
index 99146d6..08dfb2f 100644 (file)
@@ -17,8 +17,7 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include "freeldr.h"
-#include "machine.h"
+#include <freeldr.h>
 
 #undef MachConsPutChar
 #undef MachConsKbHit
 #undef MachVideoSetPaletteColor
 #undef MachVideoGetPaletteColor
 #undef MachVideoSync
-#undef MachVideoPrepareForReactOS
+#undef MachBeep
+#undef MachPrepareForReactOS
 #undef MachGetMemoryMap
 #undef MachDiskGetBootVolume
 #undef MachDiskGetSystemVolume
 #undef MachDiskGetBootPath
 #undef MachDiskGetBootDevice
 #undef MachDiskBootingFromFloppy
+#undef MachDiskNormalizeSystemPath
 #undef MachDiskReadLogicalSectors
 #undef MachDiskGetPartitionEntry
 #undef MachDiskGetDriveGeometry
@@ -57,7 +58,7 @@ MachConsPutChar(int Ch)
   MachVtbl.ConsPutChar(Ch);
 }
 
-BOOL
+BOOLEAN
 MachConsKbHit()
 {
   return MachVtbl.ConsKbHit();
@@ -76,7 +77,7 @@ MachVideoClearScreen(UCHAR Attr)
 }
 
 VIDEODISPLAYMODE
-MachVideoSetDisplayMode(char *DisplayMode, BOOL Init)
+MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
 {
   return MachVtbl.VideoSetDisplayMode(DisplayMode, Init);
 }
@@ -100,7 +101,7 @@ MachVideoSetTextCursorPosition(ULONG X, ULONG Y)
 }
 
 VOID
-MachVideoHideShowTextCursor(BOOL Show)
+MachVideoHideShowTextCursor(BOOLEAN Show)
 {
   MachVtbl.VideoHideShowTextCursor(Show);
 }
@@ -117,7 +118,7 @@ MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
   MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer);
 }
 
-BOOL
+BOOLEAN
 MachVideoIsPaletteFixed(VOID)
 {
   return MachVtbl.VideoIsPaletteFixed();
@@ -142,9 +143,15 @@ MachVideoSync(VOID)
 }
 
 VOID
-MachVideoPrepareForReactOS(VOID)
+MachBeep(VOID)
 {
-  MachVtbl.VideoPrepareForReactOS();
+  MachVtbl.Beep();
+}
+
+VOID
+MachPrepareForReactOS(IN BOOLEAN Setup)
+{
+  MachVtbl.PrepareForReactOS(Setup);
 }
 
 ULONG
@@ -153,13 +160,13 @@ MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize)
   return MachVtbl.GetMemoryMap(BiosMemoryMap, MaxMemoryMapSize);
 }
 
-BOOL
+BOOLEAN
 MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType)
 {
   return MachVtbl.DiskGetBootVolume(DriveNumber, StartSector, SectorCount, FsType);
 }
 
-BOOL
+BOOLEAN
 MachDiskGetSystemVolume(char *SystemPath,
                         char *RemainingPath,
                         PULONG Device,
@@ -173,7 +180,7 @@ MachDiskGetSystemVolume(char *SystemPath,
                                       FsType);
 }
 
-BOOL
+BOOLEAN
 MachDiskGetBootPath(char *BootPath, unsigned Size)
 {
   return MachVtbl.DiskGetBootPath(BootPath, Size);
@@ -185,25 +192,31 @@ MachDiskGetBootDevice(PULONG BootDevice)
   MachVtbl.DiskGetBootDevice(BootDevice);
 }
 
-BOOL
+BOOLEAN
 MachDiskBootingFromFloppy()
 {
   return MachVtbl.DiskBootingFromFloppy();
 }
 
-BOOL
+BOOLEAN
+MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size)
+{
+  return MachVtbl.DiskNormalizeSystemPath(SystemPath, Size);
+}
+
+BOOLEAN
 MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
 {
   return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer);
 }
 
-BOOL
+BOOLEAN
 MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
 {
   return MachVtbl.DiskGetPartitionEntry(DriveNumber, PartitionNumber, PartitionTableEntry);
 }
 
-BOOL
+BOOLEAN
 MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry)
 {
   return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry);