diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2013-06-01 23:00:17 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2013-06-01 23:00:17 +0000 |
commit | 22dbd7a37aa51e72a78370e495828194c9aa1cfd (patch) | |
tree | 467aebfbf59e8d1181094034a5e83a2d972cdf33 /sys/dev | |
parent | 5e5564dd5940e631664e1ad9b843b953f69e9529 (diff) |
Stop printing ACPI wakeup devices in dmesg after the 16th wakeup device.
Helps with VMware VMs that report hundreds of wakeup devices.
ok reyk@, deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 7192f3df33e..9d65faa395c 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.245 2013/05/31 22:43:43 bluhm Exp $ */ +/* $OpenBSD: acpi.c,v 1.246 2013/06/01 23:00:16 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -631,6 +631,7 @@ acpi_attach(struct device *parent, struct device *self, void *aux) struct acpi_dsdt *p_dsdt; int idx; #ifndef SMALL_KERNEL + int wakeup_dev_ct; struct acpi_wakeq *wentry; struct device *dev; struct acpi_ac *ac; @@ -796,10 +797,15 @@ acpi_attach(struct device *parent, struct device *self, void *aux) #ifndef SMALL_KERNEL /* Display wakeup devices and lowest S-state */ + wakeup_dev_ct = 0; printf("%s: wakeup devices", DEVNAME(sc)); SIMPLEQ_FOREACH(wentry, &sc->sc_wakedevs, q_next) { - printf(" %.4s(S%d)", wentry->q_node->name, - wentry->q_state); + if (wakeup_dev_ct < 16) + printf(" %.4s(S%d)", wentry->q_node->name, + wentry->q_state); + else if (wakeup_dev_ct == 16) + printf(" [...]"); + wakeup_dev_ct ++; } printf("\n"); |