mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 23:46:50 +00:00
Remove support for machine specific versions of DiskGetBootVolume and DiskGetSystemVolume
svn path=/trunk/; revision=43003
This commit is contained in:
parent
f0d54803ce
commit
86500a05fc
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue