diff --git a/reactos/boot/freeldr/freeldr/arch/arm/macharm.c b/reactos/boot/freeldr/freeldr/arch/arm/macharm.c index 0aad13b6e29..1bff123d1e2 100644 --- a/reactos/boot/freeldr/freeldr/arch/arm/macharm.c +++ b/reactos/boot/freeldr/freeldr/arch/arm/macharm.c @@ -201,8 +201,6 @@ MachInit(IN PCCH CommandLine) // // Now set default disk handling routines -- we don't need to override // - MachVtbl.DiskGetBootVolume = DiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskGetBootDevice = DiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c index c9b346706b0..628c2812f9a 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c @@ -44,8 +44,6 @@ PcMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = PcPrepareForReactOS; MachVtbl.GetMemoryMap = PcMemGetMemoryMap; - MachVtbl.DiskGetBootVolume = DiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskGetBootDevice = DiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c index 612404a806b..c03dc42d016 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -47,8 +47,6 @@ XboxMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = XboxPrepareForReactOS; MachVtbl.GetMemoryMap = XboxMemGetMemoryMap; - MachVtbl.DiskGetBootVolume = DiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskGetBootDevice = DiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy; diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c index e6840f07358..7a3355ebcbd 100644 --- a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c +++ b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c @@ -247,36 +247,6 @@ ULONG PpcGetMemoryMap( PBIOS_MEMORY_MAP BiosMemoryMap, return slots; } -/* Strategy: - * - * For now, it'll be easy enough to use the boot command line as our boot path. - * Treat it as the path of a disk partition. We might even be able to get - * away with grabbing a partition image by tftp in this scenario. - */ - -BOOLEAN PpcDiskGetBootVolume( PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType ) { - *DriveNumber = 0; - *StartSector = 0; - *SectorCount = 0; - *FsType = FS_FAT; - return TRUE; -} - -BOOLEAN PpcDiskGetSystemVolume( char *SystemPath, - char *RemainingPath, - PULONG Device ) { - char *remain = strchr(SystemPath, '\\'); - if( remain ) { - strcpy( RemainingPath, remain+1 ); - } else { - RemainingPath[0] = 0; - } - *Device = 0; - // Hack to be a bit easier on ram - CacheSizeLimit = 64 * 1024; - return TRUE; -} - BOOLEAN PpcDiskGetBootPath( char *OutBootPath, unsigned Size ) { strncpy( OutBootPath, BootPath, Size ); return TRUE; @@ -523,8 +493,6 @@ void PpcDefaultMachVtbl() MachVtbl.GetMemoryMap = PpcGetMemoryMap; MachVtbl.DiskNormalizeSystemPath = PpcDiskNormalizeSystemPath; - MachVtbl.DiskGetBootVolume = PpcDiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = PpcDiskGetSystemVolume; MachVtbl.DiskGetBootPath = PpcDiskGetBootPath; MachVtbl.DiskGetBootDevice = PpcDiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = PpcDiskBootingFromFloppy; @@ -566,6 +534,8 @@ void PpcOfwInit() } void PpcInit( of_proxy the_ofproxy ) { + // Hack to be a bit easier on ram + CacheSizeLimit = 64 * 1024; ofproxy = the_ofproxy; PpcDefaultMachVtbl(); if(ofproxy) PpcOfwInit(); diff --git a/reactos/boot/freeldr/freeldr/include/machine.h b/reactos/boot/freeldr/freeldr/include/machine.h index f185affe1c2..47979c51b94 100644 --- a/reactos/boot/freeldr/freeldr/include/machine.h +++ b/reactos/boot/freeldr/freeldr/include/machine.h @@ -62,8 +62,6 @@ typedef struct tagMACHVTBL MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(MEMORY_DESCRIPTOR* Current); ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); - BOOLEAN (*DiskGetBootVolume)(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); - BOOLEAN (*DiskGetSystemVolume)(char *SystemPath, char *RemainingPath, PULONG Device); BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); VOID (*DiskGetBootDevice)(PULONG BootDevice); BOOLEAN (*DiskBootingFromFloppy)(VOID); @@ -100,11 +98,6 @@ VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue VOID MachVideoSync(VOID); VOID MachBeep(VOID); MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current); -BOOLEAN MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); -BOOLEAN -MachDiskGetSystemVolume(char *SystemPath, - char *RemainingPath, - PULONG Device); BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size); VOID MachDiskGetBootDevice(PULONG BootDevice); BOOLEAN MachDiskBootingFromFloppy(); @@ -135,8 +128,6 @@ VOID MachPrepareForReactOS(IN BOOLEAN Setup); #define MachVideoSync() MachVtbl.VideoSync() #define MachBeep() MachVtbl.Beep() #define MachPrepareForReactOS(a) MachVtbl.PrepareForReactOS(a) -#define MachDiskGetBootVolume(Drv, Start, Cnt, FsType) MachVtbl.DiskGetBootVolume((Drv), (Start), (Cnt), (FsType)) -#define MachDiskGetSystemVolume(SysPath, RemPath, Dev) MachVtbl.DiskGetSystemVolume((SysPath), (RemPath), (Dev)) #define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size)) #define MachDiskGetBootDevice(BootDevice) MachVtbl.DiskGetBootDevice(BootDevice) #define MachDiskBootingFromFloppy() MachVtbl.DiskBootingFromFloppy() diff --git a/reactos/boot/freeldr/freeldr/linuxboot.c b/reactos/boot/freeldr/freeldr/linuxboot.c index eef427e1643..904ea52d044 100644 --- a/reactos/boot/freeldr/freeldr/linuxboot.c +++ b/reactos/boot/freeldr/freeldr/linuxboot.c @@ -73,11 +73,6 @@ VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description) UiMessageBox("Invalid boot path"); goto LinuxBootFailed; } - if (!MachDiskGetSystemVolume(LinuxBootPath, NULL, NULL)) - { - UiMessageBox("Failed to get system volume."); - goto LinuxBootFailed; - } // Open the kernel LinuxKernel = FsOpenFile(LinuxKernelName); diff --git a/reactos/boot/freeldr/freeldr/machine.c b/reactos/boot/freeldr/freeldr/machine.c index 0c397211275..79c8c74e966 100644 --- a/reactos/boot/freeldr/freeldr/machine.c +++ b/reactos/boot/freeldr/freeldr/machine.c @@ -36,8 +36,6 @@ #undef MachVideoSync #undef MachBeep #undef MachPrepareForReactOS -#undef MachDiskGetBootVolume -#undef MachDiskGetSystemVolume #undef MachDiskGetBootPath #undef MachDiskGetBootDevice #undef MachDiskBootingFromFloppy @@ -324,20 +322,6 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) } } -BOOLEAN -MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType) -{ - return MachVtbl.DiskGetBootVolume(DriveNumber, StartSector, SectorCount, FsType); -} - -BOOLEAN -MachDiskGetSystemVolume(char *SystemPath, - char *RemainingPath, - PULONG Device) -{ - return MachVtbl.DiskGetSystemVolume(SystemPath, RemainingPath, Device); -} - BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size) { diff --git a/reactos/boot/freeldr/freeldr/miscboot.c b/reactos/boot/freeldr/freeldr/miscboot.c index ad52593d938..8452efdc7d6 100644 --- a/reactos/boot/freeldr/freeldr/miscboot.c +++ b/reactos/boot/freeldr/freeldr/miscboot.c @@ -51,12 +51,6 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName) return; } - if (!MachDiskGetSystemVolume(FileName, FileName, NULL)) - { - UiMessageBox("Failed to get system volume."); - return; - } - FilePointer = FsOpenFile(FileName); if (!FilePointer) { diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index ec27cac271d..80b26c93d19 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -758,7 +758,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) /* * Try to get system volume */ - if (!MachDiskGetSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice)) + if (!DiskGetSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice)) { UiMessageBox("Failed to get system volume."); return;