aboutsummaryrefslogtreecommitdiff
path: root/shutdown/acpi_shutdown.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-02 15:38:06 -0800
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-03 11:35:29 +0100
commit835a1112dc5ca8d066fa1d0e2dfb979c19bf58be (patch)
tree6d0a0441c0fd0c1664a5b89f98a6b19e4e1913be /shutdown/acpi_shutdown.c
parent28050d6310c7bd0817e83aac8b4cb27b518f4267 (diff)
downloadhurd-835a1112dc5ca8d066fa1d0e2dfb979c19bf58be.tar.gz
hurd-835a1112dc5ca8d066fa1d0e2dfb979c19bf58be.tar.bz2
hurd-835a1112dc5ca8d066fa1d0e2dfb979c19bf58be.zip
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 :)
Diffstat (limited to 'shutdown/acpi_shutdown.c')
-rw-r--r--shutdown/acpi_shutdown.c8
1 files changed, 6 insertions, 2 deletions
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;
}