Author: hpoussin Date: Sun Sep 6 17:59:16 2009 New Revision: 43003
URL: http://svn.reactos.org/svn/reactos?rev=43003&view=rev Log: Remove support for machine specific versions of DiskGetBootVolume and DiskGetSystemVolume
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/linuxboot.c trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/miscboot.c trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/a... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -201,8 +201,6 @@ // // 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;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -44,8 +44,6 @@ MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = PcPrepareForReactOS; MachVtbl.GetMemoryMap = PcMemGetMemoryMap; - MachVtbl.DiskGetBootVolume = DiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskGetBootDevice = DiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -47,8 +47,6 @@ MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = XboxPrepareForReactOS; MachVtbl.GetMemoryMap = XboxMemGetMemoryMap; - MachVtbl.DiskGetBootVolume = DiskGetBootVolume; - MachVtbl.DiskGetSystemVolume = DiskGetSystemVolume; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskGetBootDevice = DiskGetBootDevice; MachVtbl.DiskBootingFromFloppy = DiskBootingFromFloppy;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/p... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -245,36 +245,6 @@ slots, total / 1024, regdata[1] / 1024 );
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 ) { @@ -523,8 +493,6 @@ 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 PpcInit( of_proxy the_ofproxy ) { + // Hack to be a bit easier on ram + CacheSizeLimit = 64 * 1024; ofproxy = the_ofproxy; PpcDefaultMachVtbl(); if(ofproxy) PpcOfwInit();
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -62,8 +62,6 @@ 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 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 @@ #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()
Modified: trunk/reactos/boot/freeldr/freeldr/linuxboot.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/linuxb... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -73,11 +73,6 @@ 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);
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 Sep 6 17:59:16 2009 @@ -36,8 +36,6 @@ #undef MachVideoSync #undef MachBeep #undef MachPrepareForReactOS -#undef MachDiskGetBootVolume -#undef MachDiskGetSystemVolume #undef MachDiskGetBootPath #undef MachDiskGetBootDevice #undef MachDiskBootingFromFloppy @@ -325,20 +323,6 @@ }
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) { return MachVtbl.DiskGetBootPath(BootPath, Size);
Modified: trunk/reactos/boot/freeldr/freeldr/miscboot.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/miscbo... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/miscboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/miscboot.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -51,12 +51,6 @@ return; }
- if (!MachDiskGetSystemVolume(FileName, FileName, NULL)) - { - UiMessageBox("Failed to get system volume."); - return; - } - FilePointer = FsOpenFile(FileName); if (!FilePointer) {
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reacto... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Sun Sep 6 17:59:16 2009 @@ -758,7 +758,7 @@ /* * Try to get system volume */ - if (!MachDiskGetSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice)) + if (!DiskGetSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice)) { UiMessageBox("Failed to get system volume."); return;