work with ACPI.
ok deraadt@, phessler@, feedback kettenis@
-/* $OpenBSD: acpiac.c,v 1.27 2009/03/11 20:37:46 jordan Exp $ */
+/* $OpenBSD: acpiac.c,v 1.28 2010/08/07 16:55:38 canacar Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
*/
#include <sys/param.h>
+#include <sys/event.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/malloc.h>
#include <machine/bus.h>
+#include <machine/apmvar.h>
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
acpiac_getsta(sc);
sc->sc_sens[0].value = sc->sc_ac_stat;
+ acpi_record_event(sc->sc_acpi, APM_POWER_CHANGE);
}
int
-/* $OpenBSD: acpibat.c,v 1.56 2010/07/21 19:35:15 deraadt Exp $ */
+/* $OpenBSD: acpibat.c,v 1.57 2010/08/07 16:55:38 canacar Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
#include <sys/sensors.h>
#include <machine/bus.h>
+#include <machine/apmvar.h>
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
sc->sc_sens[7].status = SENSOR_S_UNSPEC;
sc->sc_sens[7].flags = 0;
}
+ acpi_record_event(sc->sc_acpi, APM_POWER_CHANGE);
}
int