Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/hpc validate cf_name in driver match method



details:   https://anonhg.NetBSD.org/src/rev/877305a4325d
branches:  trunk
changeset: 762166:877305a4325d
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Feb 16 23:44:19 2011 +0000

description:
validate cf_name in driver match method

diffstat:

 sys/arch/sgimips/hpc/panel.c  |  9 +++++++--
 sys/arch/sgimips/hpc/pi1ppc.c |  9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (60 lines):

diff -r 8fc793ea2619 -r 877305a4325d sys/arch/sgimips/hpc/panel.c
--- a/sys/arch/sgimips/hpc/panel.c      Wed Feb 16 23:22:30 2011 +0000
+++ b/sys/arch/sgimips/hpc/panel.c      Wed Feb 16 23:44:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: panel.c,v 1.1 2009/05/14 01:10:19 macallan Exp $ */
+/*     $NetBSD: panel.c,v 1.2 2011/02/16 23:44:19 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2009 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.1 2009/05/14 01:10:19 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.2 2011/02/16 23:44:19 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,6 +71,11 @@
 static int
 panel_match(device_t parent, cfdata_t match, void *aux)
 {
+       struct hpc_attach_args *ha = aux;
+
+       if (strcmp(ha->ha_name, match->cf_name) != 0)
+               return 0;
+
        if (mach_type == MACH_SGI_IP22)
                return 1;
 
diff -r 8fc793ea2619 -r 877305a4325d sys/arch/sgimips/hpc/pi1ppc.c
--- a/sys/arch/sgimips/hpc/pi1ppc.c     Wed Feb 16 23:22:30 2011 +0000
+++ b/sys/arch/sgimips/hpc/pi1ppc.c     Wed Feb 16 23:44:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pi1ppc.c,v 1.8 2011/01/25 12:21:04 tsutsui Exp $ */
+/* $NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2001 Alcove - Nicolas Souchu
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.8 2011/01/25 12:21:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $");
 
 #include "opt_pi1ppc.h"
 
@@ -162,6 +162,11 @@
 static int
 pi1ppc_match(device_t parent, cfdata_t match, void *aux)
 {
+       struct hpc_attach_args *ha = aux;
+
+       if (strcmp(ha->ha_name, match->cf_name) != 0)
+               return 0;
+
        if (mach_type == MACH_SGI_IP22)
                return 1;
 



Home | Main Index | Thread Index | Old Index