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:
Andreas Färber 2010-06-27 17:56:05 +00:00
parent b62981b983
commit 4fa4224a1d

View File

@ -55,6 +55,8 @@ clear_bss(void)
static void
determine_machine(void)
{
gMachine = MACHINE_UNKNOWN;
int root = of_finddevice("/");
char buffer[64];
int length;
@ -64,8 +66,6 @@ determine_machine(void)
// ToDo: add more, and be as generic as possible
gMachine = MACHINE_UNKNOWN;
if (!strcasecmp("chrp", buffer))
gMachine = MACHINE_CHRP;
else if (!strcasecmp("bootrom", buffer))