Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sgimips/sgimips Rework conditional statement a bit ...



details:   https://anonhg.NetBSD.org/src/rev/1b11032737bf
branches:  trunk
changeset: 565505:1b11032737bf
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Apr 10 20:15:12 2004 +0000

description:
Rework conditional statement a bit to print bit about using ARCS for
console I/O if nothing really attached, not if we just called consinit()
with an invalid IPxy mach_type.

inpired by Steve Rumble

diffstat:

 sys/arch/sgimips/sgimips/console.c |  19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diffs (68 lines):

diff -r ef69580b4cf7 -r 1b11032737bf sys/arch/sgimips/sgimips/console.c
--- a/sys/arch/sgimips/sgimips/console.c        Sat Apr 10 20:03:11 2004 +0000
+++ b/sys/arch/sgimips/sgimips/console.c        Sat Apr 10 20:15:12 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: console.c,v 1.24 2004/04/10 20:03:11 pooka Exp $       */
+/*     $NetBSD: console.c,v 1.25 2004/04/10 20:15:12 pooka Exp $       */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.24 2004/04/10 20:03:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.25 2004/04/10 20:15:12 pooka Exp $");
 
 #include "opt_kgdb.h"
 
@@ -100,6 +100,8 @@
                        pckbc_cnattach(1,
                            0x1fb80000+HPC_PBUS_CH6_DEVREGS+IOC_KB_REGS,
                            KBCMDP, PCKBC_KBD_SLOT);
+
+                       return;
                }
 #endif
        case MACH_SGI_IP12:
@@ -109,6 +111,8 @@
                    (consdev[7] == '0' || consdev[7] == '1')) {
                        cn_tab = &zs_cn;
                        (*cn_tab->cn_init)(cn_tab);
+                       
+                       return;
                }
 #endif
                break;
@@ -116,8 +120,8 @@
        case MACH_SGI_IP32:
 #if (NCOM > 0)
                if ((strlen(consdev) == 9) &&
-                   (!strncmp(consdev, "serial", 6)) &&
-                   (consdev[7] == '0' || consdev[7] == '1')) {
+                   (!strncmp(consdev, "serial", 6)) &&
+                   (consdev[7] == '0' || consdev[7] == '1')) {
                        delay(10000);
                        /* XXX: hardcoded MACE iotag */
                        if (comcnattach(3,
@@ -126,15 +130,18 @@
                            MACE_ISA_SER1_BASE:MACE_ISA_SER2_BASE)),
                            speed, COM_FREQ, COM_TYPE_NORMAL,
                            comcnmode) == 0)
-                               break;
+                               return;
                }
 #endif
                panic("ip32 supports serial console only.  sorry.");
                break;
+
        default:
-               printf("Using ARCS for console I/O.\n");
+               panic("consinit(): unknown machine type IP%d\n", mach_type);
                break;
        }
+
+       printf("Using ARCS for console I/O.\n");
 }
 
 #if defined(KGDB)



Home | Main Index | Thread Index | Old Index