mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:15:07 +00:00
LibCore: Use new global variables at /sys/kernel/ directory
This commit is contained in:
parent
5dfb2b18f3
commit
c7dca00b65
2 changed files with 4 additions and 4 deletions
|
@ -20,13 +20,13 @@ Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(RefPtr<Core::F
|
|||
{
|
||||
if (proc_all_file) {
|
||||
if (!proc_all_file->seek(0, Core::SeekMode::SetPosition)) {
|
||||
warnln("ProcessStatisticsReader: Failed to refresh /proc/all: {}", proc_all_file->error_string());
|
||||
warnln("ProcessStatisticsReader: Failed to refresh /sys/kernel/processes: {}", proc_all_file->error_string());
|
||||
return {};
|
||||
}
|
||||
} else {
|
||||
proc_all_file = Core::File::construct("/proc/all");
|
||||
proc_all_file = Core::File::construct("/sys/kernel/processes");
|
||||
if (!proc_all_file->open(Core::OpenMode::ReadOnly)) {
|
||||
warnln("ProcessStatisticsReader: Failed to open /proc/all: {}", proc_all_file->error_string());
|
||||
warnln("ProcessStatisticsReader: Failed to open /sys/kernel/processes: {}", proc_all_file->error_string());
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue