Shutting down the computer when you press the power button
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 5ef885e..859b235 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -263,6 +263,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) case ACPI_BUTTON_NOTIFY_STATUS: acpi_bus_generate_event(button->device, event, ++button->pushed); + printk(KERN_DEBUG "ACPI_EVENT_POWER_BUTTON has occured\n"); + kill_proc(1,SIGWINCH,1); break; default: ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -348,6 +350,7 @@ static int acpi_button_add(struct acpi_device *device)switch (button->type) { case ACPI_BUTTON_TYPE_POWERF: + case ACPI_BUTTON_TYPE_POWER: status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, acpi_button_notify_fixed,