1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Userland: Replace lsinterrupts with lsirq

Also, lsirq will return more useful data than lsinterrupts did
This commit is contained in:
Liav A 2020-03-05 19:18:52 +02:00 committed by Andreas Kling
parent e2889e665f
commit 259ead5d7a
Notes: sideshowbarker 2024-07-19 08:52:17 +09:00

View file

@ -58,17 +58,18 @@ int main(int argc, char** argv)
return 1;
}
printf("%-18s %-10s %-13s\n", "Device", "Interrupt", "Call Counter");
printf("%4s %-10s\n", " ", "CPU0");
auto file_contents = proc_interrupts->read_all();
auto json = JsonValue::from_string(file_contents).as_array();
json.for_each([](auto& value) {
auto handler = value.as_object();
auto purpose = handler.get("purpose").to_string();
auto interrupt = handler.get("interrupt_line").to_string();
auto controller = handler.get("controller").to_string();
auto call_count = handler.get("call_count").to_string();
printf("%-18s %-10s %-13s\n",
purpose.characters(), interrupt.characters(), call_count.characters());
printf("%4s: %-10s %-10s %-30s\n",
interrupt.characters(), call_count.characters(), controller.characters(), purpose.characters());
});
return 0;