Ticket #6123: 0001-Initialize-machine-to-unknown-before-return.patch

File 0001-Initialize-machine-to-unknown-before-return.patch, 994 bytes (added by andreasf, 9 years ago)

proposed patch

  • src/system/boot/platform/openfirmware/start.c

    From c618ee05943cb7eae9e9b28fe06c0b960d71c116 Mon Sep 17 00:00:00 2001
    From: Andreas Faerber <andreas.faerber@web.de>
    Date: Thu, 3 Jun 2010 14:09:32 +0200
    Subject: [PATCH] Initialize machine to unknown before return
    
    ---
     src/system/boot/platform/openfirmware/start.c |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/system/boot/platform/openfirmware/start.c b/src/system/boot/platform/openfirmware/start.c
    index 7a8dc2e..4782a74 100644
    a b clear_bss(void)  
    5454static void
    5555determine_machine(void)
    5656{
     57    gMachine = MACHINE_UNKNOWN;
     58
    5759    int root = of_finddevice("/");
    5860    char buffer[64];
    5961    int length;
    determine_machine(void)  
    6365
    6466    // ToDo: add more, and be as generic as possible
    6567
    66     gMachine = MACHINE_UNKNOWN;
    67 
    6868    if (!strcasecmp("chrp", buffer))
    6969        gMachine = MACHINE_CHRP;
    7070    else if (!strcasecmp("bootrom", buffer))