mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
f8489da8ee
Normally, trying to truncate a SysFSInode should result in EPERM error. However, as suggested by Ali (@alimpfard), we can allow the PowerState node to be "truncated" so one can open that file with O_TRUNC option. Likewise, we also need to provide a way to set modified time on SysFS inodes. For most inodes, we should return ENOTIMPL error, but for the power state switch, we ignore the modified time setting and just return KSuccess. These fixes allow to do "echo -n 1 > /sys/firmware/power_state" in Shell after gaining root permissions, to switch the power state. |
||
---|---|---|
.. | ||
ACPI | ||
BIOS.cpp | ||
BIOS.h | ||
PowerStateSwitch.cpp | ||
PowerStateSwitch.h | ||
SysFSFirmware.cpp | ||
SysFSFirmware.h |