Source-Changes-HG archive

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

[src/ad_pmax_wscons]: src/sys/arch/pmax/tc Bail out if dt_identify() fails.



details:   https://anonhg.NetBSD.org/src/rev/9ca4230a60ed
branches:  ad_pmax_wscons
changeset: 523755:9ca4230a60ed
user:      ad <ad%NetBSD.org@localhost>
date:      Fri Mar 15 15:46:49 2002 +0000

description:
Bail out if dt_identify() fails.

diffstat:

 sys/arch/pmax/tc/dtkbd.c |  7 ++++---
 sys/arch/pmax/tc/dtms.c  |  7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 38a65aaf6d41 -r 9ca4230a60ed sys/arch/pmax/tc/dtkbd.c
--- a/sys/arch/pmax/tc/dtkbd.c  Fri Mar 15 14:26:48 2002 +0000
+++ b/sys/arch/pmax/tc/dtkbd.c  Fri Mar 15 15:46:49 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtkbd.c,v 1.1.2.2 2002/03/15 14:26:48 ad Exp $ */
+/*     $NetBSD: dtkbd.c,v 1.1.2.3 2002/03/15 15:46:49 ad Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.1.2.2 2002/03/15 14:26:48 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.1.2.3 2002/03/15 15:46:49 ad Exp $");
 
 #include "locators.h"
 
@@ -124,7 +124,8 @@
         */
        if (cf->cf_loc[DTCF_ADDR] == DTCF_ADDR_DEFAULT &&
            (dta->dta_addr == DT_ADDR_KBD || dta->dta_addr == DT_ADDR_MOUSE)) {
-               dt_identify(dta->dta_addr, &ident);
+               if (dt_identify(dta->dta_addr, &ident))
+                       return (0);
                return (strncmp(ident.vendor, "DEC     ", 8) == 0 &&
                    strncmp(ident.module, "LK501-", 6) == 0);
        }
diff -r 38a65aaf6d41 -r 9ca4230a60ed sys/arch/pmax/tc/dtms.c
--- a/sys/arch/pmax/tc/dtms.c   Fri Mar 15 14:26:48 2002 +0000
+++ b/sys/arch/pmax/tc/dtms.c   Fri Mar 15 15:46:49 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtms.c,v 1.1.2.1 2002/03/15 14:22:49 ad Exp $  */
+/*     $NetBSD: dtms.c,v 1.1.2.2 2002/03/15 15:46:49 ad Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtms.c,v 1.1.2.1 2002/03/15 14:22:49 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtms.c,v 1.1.2.2 2002/03/15 15:46:49 ad Exp $");
 
 #include "locators.h"
 
@@ -102,7 +102,8 @@
         */
        if (cf->cf_loc[DTCF_ADDR] == DTCF_ADDR_DEFAULT &&
            (dta->dta_addr == DT_ADDR_KBD || dta->dta_addr == DT_ADDR_MOUSE)) {
-               dt_identify(dta->dta_addr, &ident);
+               if (dt_identify(dta->dta_addr, &ident))
+                       return (0);
                return (strncmp(ident.vendor, "DEC     ", 8) == 0 &&
                    strncmp(ident.module, "VSXXX-", 6) == 0);
        }



Home | Main Index | Thread Index | Old Index