Ticket #6105: 0006-Disable-fake-serial-output-for-frame-buffer.patch

File 0006-Disable-fake-serial-output-for-frame-buffer.patch, 1.2 KB (added by andreasf, 10 years ago)

proposed patch: suppress fake serial output for frame buffer

  • src/system/kernel/arch/ppc/arch_platform.cpp

    From 22fefe335d8dcd4294a366acbe6f8b36487af108 Mon Sep 17 00:00:00 2001
    From: Andreas Faerber <andreas.faerber@web.de>
    Date: Tue, 1 Jun 2010 22:18:36 +0200
    Subject: [PATCH 6/6] Disable fake serial output for frame buffer
    
    ---
     src/system/kernel/arch/ppc/arch_platform.cpp |    9 +++++++--
     1 files changed, 7 insertions(+), 2 deletions(-)
    
    diff --git a/src/system/kernel/arch/ppc/arch_platform.cpp b/src/system/kernel/arch/ppc/arch_platform.cpp
    index c30bcd2..2e2d95f 100644
    a b PPCOpenFirmware::InitSerialDebug(struct kernel_args *kernelArgs)  
    120120{
    121121    if (of_getprop(gChosen, "stdin", &fInput, sizeof(int)) == OF_FAILED)
    122122        return B_ERROR;
    123     if (of_getprop(gChosen, "stdout", &fOutput, sizeof(int)) == OF_FAILED)
    124         return B_ERROR;
     123    if (!kernelArgs->frame_buffer.enabled) {
     124        if (of_getprop(gChosen, "stdout", &fOutput, sizeof(int)) == OF_FAILED)
     125            return B_ERROR;
     126    }
    125127
    126128    return B_OK;
    127129}
    PPCOpenFirmware::SerialDebugGetChar()  
    168170void
    169171PPCOpenFirmware::SerialDebugPutChar(char c)
    170172{
     173    if (fOutput == -1)
     174        return;
     175
    171176    if (c == '\n')
    172177        of_write(fOutput, "\r\n", 2);
    173178    else