From 3a68545201a436ceba2c926c3e6c89c0bf553071 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 2 Oct 2005 09:42:12 +0000 Subject: [PATCH] Disable the serial debug output if the com port doesn't exist. svn path=/trunk/; revision=18206 --- reactos/ntoskrnl/kd/kdio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/kd/kdio.c b/reactos/ntoskrnl/kd/kdio.c index 67025151ad1..bafc17b5ba2 100644 --- a/reactos/ntoskrnl/kd/kdio.c +++ b/reactos/ntoskrnl/kd/kdio.c @@ -171,7 +171,11 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable, DispatchTable->KdpPrintRoutine = KdpSerialDebugPrint; /* Initialize the Port */ - KdPortInitializeEx(&SerialPortInfo, 0, 0); + if (!KdPortInitializeEx(&SerialPortInfo, 0, 0)) + { + KdpDebugMode.Serial = FALSE; + return; + } /* Register as a Provider */ InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);