Skip to main content

Power

Control the power state of the machine

ethereal_reboot

int ethereal_reboot(int operation);

Perform the requested power operation on the system.

Available options:

  • REBOOT_TYPE_DEFAULT: Reboot the system
  • REBOOT_TYPE_POWEROFF: Shutdown the system
  • REBOOT_TYPE_HIBERNATE: Hibernate the system

Performs safe shutdown on reboot/poweroff. Requires ACPI for proper shutdown/hibernate.

Root permission is required for all operations with this function, and the call will fail with EPERM otherwise.