From 835a1112dc5ca8d066fa1d0e2dfb979c19bf58be Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 2 Mar 2019 15:38:06 -0800 Subject: shutdown: clean up debugging pieces * shutdown/acpi_shutdown.c (disappear_via_acpi): Call ioperm only on required ports, not all ports. * shutdown/shutdown.c (S_shutdown, main): Remove debugging messages, even if joyful :) --- shutdown/acpi_shutdown.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'shutdown/acpi_shutdown.c') diff --git a/shutdown/acpi_shutdown.c b/shutdown/acpi_shutdown.c index af9b15d4..a45b2e74 100644 --- a/shutdown/acpi_shutdown.c +++ b/shutdown/acpi_shutdown.c @@ -37,8 +37,12 @@ void disappear_via_acpi(void) fclose(facp); /* Get I/O permissions */ - if (ioperm(0, 0xffff, 1)) { - mach_print("EPERM on ioperm()\n"); + if (ioperm(smi_cmd, 2, 1)) { + mach_print("EPERM on ioperm(smi_cmd)\n"); + return; + } + if (ioperm(pm1a_ctl, 2, 1)) { + mach_print("EPERM on ioperm(pm1a_ctl)\n"); return; } -- cgit v1.2.3