diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-03-02 15:38:06 -0800 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-03-03 11:35:29 +0100 |
commit | 835a1112dc5ca8d066fa1d0e2dfb979c19bf58be (patch) | |
tree | 6d0a0441c0fd0c1664a5b89f98a6b19e4e1913be /shutdown | |
parent | 28050d6310c7bd0817e83aac8b4cb27b518f4267 (diff) | |
download | hurd-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')
-rw-r--r-- | shutdown/acpi_shutdown.c | 8 | ||||
-rw-r--r-- | shutdown/shutdown.c | 3 |
2 files changed, 6 insertions, 5 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; } diff --git a/shutdown/shutdown.c b/shutdown/shutdown.c index 413b5148..44ae975a 100644 --- a/shutdown/shutdown.c +++ b/shutdown/shutdown.c @@ -56,7 +56,6 @@ struct port_class *trivfs_control_class; kern_return_t S_shutdown(trivfs_protid_t server) { - mach_print ("YAY RPC\n"); disappear_via_acpi(); return 0; } @@ -139,8 +138,6 @@ main (int argc, char *argv[]) if (err) error (3, err, "Contacting parent"); - mach_print("Hello shutdown before ports loop\n"); - /* Launch. */ do ports_manage_port_operations_multithread (port_bucket, shutdown_demuxer, |