summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:25:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:25:07 +0000
commit20a16460fc3dadc3670f74649d9efd23d4e1672f (patch)
tree253795acca41e7bc22f707e9f28e6558be0adacd /sys/arch/macppc/dev
parente27fb7cead158776491996ec81b38e8d51dcbd33 (diff)
Display unhandled adb devices as "whatever at adb0 addr X" like all buses do;
while there, make the detailed descriptions dependent on ADBVERBOSE (enabled in GENERIC) instead of DIAGNOSTIC.
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r--sys/arch/macppc/dev/abtn.c4
-rw-r--r--sys/arch/macppc/dev/adb.c23
-rw-r--r--sys/arch/macppc/dev/akbd.c3
-rw-r--r--sys/arch/macppc/dev/ams.c9
4 files changed, 20 insertions, 19 deletions
diff --git a/sys/arch/macppc/dev/abtn.c b/sys/arch/macppc/dev/abtn.c
index 239efcf90a9..3672bfbab44 100644
--- a/sys/arch/macppc/dev/abtn.c
+++ b/sys/arch/macppc/dev/abtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abtn.c,v 1.9 2003/10/16 03:54:48 deraadt Exp $ */
+/* $OpenBSD: abtn.c,v 1.10 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp $ */
/*-
@@ -79,7 +79,7 @@ abtn_attach(struct device *parent, struct device *self, void *aux)
struct adb_attach_args *aa = aux;
ADBSetInfoBlock adbinfo;
- printf("brightness/volume/eject buttons\n");
+ printf(": brightness/volume/eject buttons\n");
sc->origaddr = aa->origaddr;
sc->adbaddr = aa->adbaddr;
diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c
index 87f1f0633c7..d006ac09f76 100644
--- a/sys/arch/macppc/dev/adb.c
+++ b/sys/arch/macppc/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.16 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: adb.c,v 1.17 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */
/*-
@@ -145,7 +145,7 @@ adbattach(struct device *parent, struct device *self, void *aux)
break;
}
- printf(", %d targets\n", totaladbs);
+ printf(", %d target%s\n", totaladbs, (totaladbs == 1) ? "" : "s");
/* for each ADB device */
for (adbindex = 1; adbindex <= totaladbs; adbindex++) {
@@ -194,9 +194,8 @@ adbprint(void *args, const char *name)
rv = UNSUPP; /* most ADB device types are unsupported */
/* print out what kind of ADB device we have found */
- printf("%s addr %d: ", name, aa_args->adbaddr);
switch(aa_args->origaddr) {
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_SECURE:
printf("security dongle (%d)", aa_args->handler_id);
break;
@@ -210,7 +209,7 @@ adbprint(void *args, const char *name)
aa_args->handler_id);
rv = UNCONF;
break;
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_ABS:
switch (aa_args->handler_id) {
case ADB_ARTPAD:
@@ -238,13 +237,15 @@ adbprint(void *args, const char *name)
}
break;
default:
- printf("unknown type device, (handler %d)",
- aa_args->handler_id);
+ printf("unknown type %d device, (handler %d)",
+ aa_args->origaddr, aa_args->handler_id);
break;
-#endif /* DIAGNOSTIC */
+#endif /* ADBVERBOSE */
}
- } else /* a device matched and was configured */
- printf(" addr %d: ", aa_args->adbaddr);
+ printf(" at %s", name);
+ }
+
+ printf(" addr %d", aa_args->adbaddr);
- return rv;
+ return (rv);
}
diff --git a/sys/arch/macppc/dev/akbd.c b/sys/arch/macppc/dev/akbd.c
index 7288c9e9c6c..651bf454c52 100644
--- a/sys/arch/macppc/dev/akbd.c
+++ b/sys/arch/macppc/dev/akbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: akbd.c,v 1.19 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: akbd.c,v 1.20 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: akbd.c,v 1.13 2001/01/25 14:08:55 tsubai Exp $ */
/*
@@ -141,6 +141,7 @@ akbdattach(struct device *parent, struct device *self, void *aux)
adbinfo.siServiceRtPtr = (Ptr)kbd_adbcomplete;
adbinfo.siDataAreaAddr = (caddr_t)sc;
+ printf(": ");
switch (sc->handler_id) {
case ADB_STDKBD:
printf("standard keyboard\n");
diff --git a/sys/arch/macppc/dev/ams.c b/sys/arch/macppc/dev/ams.c
index e95498d74f3..3787b509193 100644
--- a/sys/arch/macppc/dev/ams.c
+++ b/sys/arch/macppc/dev/ams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ams.c,v 1.12 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: ams.c,v 1.13 2006/01/08 17:25:06 miod Exp $ */
/* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */
/*
@@ -112,13 +112,12 @@ amsattach(struct device *parent, struct device *self, void *aux)
ems_init(sc);
/* print out the type of mouse we have */
+ printf(": ");
switch (sc->handler_id) {
- case ADBMS_100DPI:
- printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
- (int)(sc->sc_res));
- break;
case ADBMS_200DPI:
sc->sc_res = 200;
+ /* FALLTHROUGH */
+ case ADBMS_100DPI:
printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
(int)(sc->sc_res));
break;