summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMichael Knudsen <mk@cvs.openbsd.org>2007-04-16 23:51:16 +0000
committerMichael Knudsen <mk@cvs.openbsd.org>2007-04-16 23:51:16 +0000
commitc9def03384d6622f5d244b68988f1fa22231faf3 (patch)
tree8f484a055651719df5391facad5b2e373cf260de /sys/dev/acpi
parent2f9e8b9c080bddf7b7ce74dae7d994089ddeff91 (diff)
Fix debug info when docking/undocking so it tells users what they need
to know: acpidock0: undock: status undocked acpidock0: dock: status docked This gets rid of all the garbage output that I used long ago.
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpidock.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c
index b881a2d8d8a..3b2e3c82c88 100644
--- a/sys/dev/acpi/acpidock.c
+++ b/sys/dev/acpi/acpidock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidock.c,v 1.18 2007/04/06 01:12:06 mk Exp $ */
+/* $OpenBSD: acpidock.c,v 1.19 2007/04/16 23:51:15 mk Exp $ */
/*
* Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org>
*
@@ -214,20 +214,24 @@ acpidock_notify(struct aml_node *node, int notify_type, void *arg)
{
struct acpidock_softc *sc = arg;
- printf("acpidock_notify: notify %d\n", notify_type);
+ dnprintf(5, "%s: acpidock_notify: notify %d\n", DEVNAME(sc),
+ notify_type);
+
switch (notify_type) {
case ACPIDOCK_EVENT_INSERT:
- dnprintf(10, "INSERT\n");
+ printf("%s: dock", DEVNAME(sc));
acpidock_docklock(sc, 1);
acpidock_dockctl(sc, 1);
+
break;
case ACPIDOCK_EVENT_EJECT:
- dnprintf(10, "EJECT\n");
acpidock_dockctl(sc, 0);
acpidock_docklock(sc, 0);
/* now actually undock */
acpidock_eject(sc, sc->sc_devnode);
+
+ printf("%s: undock", DEVNAME(sc));
break;
}
@@ -241,7 +245,7 @@ acpidock_notify(struct aml_node *node, int notify_type, void *arg)
strlcpy(sc->sc_sens[0].desc, "not docked",
sizeof(sc->sc_sens[0].desc));
- dnprintf(5, "acpidock_notify: status %s\n",
+ printf(": status %s\n",
sc->sc_docked == ACPIDOCK_STATUS_DOCKED ? "docked" : "undocked");
return (0);