summaryrefslogtreecommitdiff
path: root/sys/dev/adb/ams.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-06-15 21:32:06 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-06-15 21:32:06 +0000
commitdf2037ddb7442555cd756f9ec3b72fbeba976ec9 (patch)
tree271e985c30ad99f0a96beb3e24ed669399a9453b /sys/dev/adb/ams.c
parent7e3d4ded2937b75cb2254141749ef129a9a373c0 (diff)
Add a const char* as first member of struct adb_attach_args, so that we can
pass a struct confargs * on macppc for some specific children of the adb node, and not confuse real adb device attachments. ok mpi@
Diffstat (limited to 'sys/dev/adb/ams.c')
-rw-r--r--sys/dev/adb/ams.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/adb/ams.c b/sys/dev/adb/ams.c
index 332772d7660..fa468f60539 100644
--- a/sys/dev/adb/ams.c
+++ b/sys/dev/adb/ams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ams.c,v 1.5 2007/04/10 22:37:17 miod Exp $ */
+/* $OpenBSD: ams.c,v 1.6 2011/06/15 21:32:05 miod Exp $ */
/* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */
/*
@@ -78,6 +78,9 @@ amsmatch(struct device *parent, void *cf, void *aux)
{
struct adb_attach_args *aa_args = aux;
+ if (strcmp(aa_args->name, adb_device_name) != 0)
+ return (0);
+
if (aa_args->origaddr == ADBADDR_MS)
return 1;
else