OpenFirmware: Assure machine type is initialized
On QEMU's emulation of a PowerPC Old World Mac (g3beige), determine_machine() returns without setting the machine type to unknown, since the root device does not provide a device_type property. Move the variable assignment up a few lines to remedy this. Closes ticket #6123. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37280 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -55,6 +55,8 @@ clear_bss(void)
|
|||||||
static void
|
static void
|
||||||
determine_machine(void)
|
determine_machine(void)
|
||||||
{
|
{
|
||||||
|
gMachine = MACHINE_UNKNOWN;
|
||||||
|
|
||||||
int root = of_finddevice("/");
|
int root = of_finddevice("/");
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
int length;
|
int length;
|
||||||
@@ -64,8 +66,6 @@ determine_machine(void)
|
|||||||
|
|
||||||
// ToDo: add more, and be as generic as possible
|
// ToDo: add more, and be as generic as possible
|
||||||
|
|
||||||
gMachine = MACHINE_UNKNOWN;
|
|
||||||
|
|
||||||
if (!strcasecmp("chrp", buffer))
|
if (!strcasecmp("chrp", buffer))
|
||||||
gMachine = MACHINE_CHRP;
|
gMachine = MACHINE_CHRP;
|
||||||
else if (!strcasecmp("bootrom", buffer))
|
else if (!strcasecmp("bootrom", buffer))
|
||||||
|
|||||||
Reference in New Issue
Block a user