mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Change the format of /proc/all to JSON.
Update ProcessManager, top and WSCPUMonitor to handle the new format. Since the kernel is not allowed to use floating-point math, we now compile the JSON classes in AK without JsonValue::Type::Double support. To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
This commit is contained in:
@@ -146,7 +146,9 @@ JsonValue JsonParser::parse_number()
|
||||
{
|
||||
auto number_string = extract_while([](char ch) { return ch == '-' || (ch >= '0' && ch <= '9'); });
|
||||
bool ok;
|
||||
auto value = JsonValue(number_string.to_int(ok));
|
||||
auto value = JsonValue(number_string.to_uint(ok));
|
||||
if (!ok)
|
||||
value = JsonValue(number_string.to_int(ok));
|
||||
ASSERT(ok);
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user