summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-10-15 05:57:20 +0300
committerAndrew Kaster <andrewdkaster@gmail.com>2022-10-25 15:33:34 -0600
commit75f01692b4cb89f4058467bd49807fe41e4f1d52 (patch)
tree29c7f9c388a69b790961f33ad095a707d41c42fb /Userland
parent8c21d974b2d9afa135f400f87bbc4de4ed43a55d (diff)
downloadserenity-75f01692b4cb89f4058467bd49807fe41e4f1d52.zip
Kernel+Userland: Move /sys/firmware/power_state to /sys/kernel directory
Let's put the power_state global node into the /sys/kernel directory, because that directory represents all global nodes and variables being related to the Kernel. It's also a mutable node, that is more acceptable being in the mentioned directory due to the fact that all other files in the /sys/firmware directory are just firmware blobs and are not mutable at all.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/reboot.cpp2
-rw-r--r--Userland/Utilities/shutdown.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/reboot.cpp b/Userland/Utilities/reboot.cpp
index 3f54e7d9b0..8e24597cd1 100644
--- a/Userland/Utilities/reboot.cpp
+++ b/Userland/Utilities/reboot.cpp
@@ -10,7 +10,7 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
- auto file = TRY(Core::Stream::File::open("/sys/firmware/power_state"sv, Core::Stream::OpenMode::Write));
+ auto file = TRY(Core::Stream::File::open("/sys/kernel/power_state"sv, Core::Stream::OpenMode::Write));
const String file_contents = "1";
TRY(file->write(file_contents.bytes()));
diff --git a/Userland/Utilities/shutdown.cpp b/Userland/Utilities/shutdown.cpp
index 5801c08278..d33abba306 100644
--- a/Userland/Utilities/shutdown.cpp
+++ b/Userland/Utilities/shutdown.cpp
@@ -14,7 +14,7 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
- auto file = TRY(Core::Stream::File::open("/sys/firmware/power_state"sv, Core::Stream::OpenMode::Write));
+ auto file = TRY(Core::Stream::File::open("/sys/kernel/power_state"sv, Core::Stream::OpenMode::Write));
const String file_contents = "2";
TRY(file->write(file_contents.bytes()));