Disable the serial debug output if the com port doesn't exist.
authorHartmut Birr <osexpert@googlemail.com>
Sun, 2 Oct 2005 09:42:12 +0000 (09:42 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sun, 2 Oct 2005 09:42:12 +0000 (09:42 +0000)
svn path=/trunk/; revision=18206

reactos/ntoskrnl/kd/kdio.c

index 6702515..bafc17b 100644 (file)
@@ -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);