mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
Kernel+Userland: Introduce a new way to reboot and poweroff the machine
This change removes the halt and reboot syscalls, and create a new mechanism to change the power state of the machine. Instead of how power state was changed until now, put a SysFS node as writable only for the superuser, that with a defined value, can result in either reboot or poweroff. In the future, a power group can be assigned to this node (which will be the GroupID responsible for power management). This opens an opportunity to permit to shutdown/reboot without superuser permissions, so in the future, a userspace daemon can take control of this node to perform power management operations without superuser permissions, if we enforce different UserID/GroupID on that node.
This commit is contained in:
parent
06e95d0fd7
commit
8d0dbdeaac
11 changed files with 161 additions and 97 deletions
|
@ -127,6 +127,7 @@ set(KERNEL_SOURCES
|
|||
Firmware/ACPI/MultiProcessorParser.cpp
|
||||
Firmware/ACPI/Parser.cpp
|
||||
Firmware/BIOS.cpp
|
||||
Firmware/PowerStateSwitch.cpp
|
||||
Firmware/SysFSFirmware.cpp
|
||||
FutexQueue.cpp
|
||||
Interrupts/APIC.cpp
|
||||
|
@ -241,7 +242,6 @@ set(KERNEL_SOURCES
|
|||
Syscalls/sendfd.cpp
|
||||
Syscalls/setpgid.cpp
|
||||
Syscalls/setuid.cpp
|
||||
Syscalls/shutdown.cpp
|
||||
Syscalls/sigaction.cpp
|
||||
Syscalls/socket.cpp
|
||||
Syscalls/stat.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue