kernel_ppc: Disable fake serial output for frame buffer

Avoid writing to stdout if the frame buffer is enabled.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38305 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Andreas Färber 2010-08-22 00:57:20 +00:00
parent 3c1cb3fd02
commit e633c3c15b

View File

@ -120,8 +120,10 @@ PPCOpenFirmware::InitSerialDebug(struct kernel_args *kernelArgs)
{
if (of_getprop(gChosen, "stdin", &fInput, sizeof(int)) == OF_FAILED)
return B_ERROR;
if (of_getprop(gChosen, "stdout", &fOutput, sizeof(int)) == OF_FAILED)
return B_ERROR;
if (!kernelArgs->frame_buffer.enabled) {
if (of_getprop(gChosen, "stdout", &fOutput, sizeof(int)) == OF_FAILED)
return B_ERROR;
}
return B_OK;
}
@ -168,6 +170,9 @@ PPCOpenFirmware::SerialDebugGetChar()
void
PPCOpenFirmware::SerialDebugPutChar(char c)
{
if (fOutput == -1)
return;
if (c == '\n')
of_write(fOutput, "\r\n", 2);
else