Utilities/lsof: Replace uses of JsonObject::get_deprecated()/get_ptr()

This commit is contained in:
Sam Atkins 2022-12-22 14:28:18 +00:00 committed by Tim Flynn
parent 5d8a87bf1f
commit e8ebbcdbc5

View file

@ -87,9 +87,9 @@ static Vector<OpenFile> get_open_files_by_pid(pid_t pid)
json.as_array().for_each([pid, &files](JsonValue const& object) {
OpenFile open_file;
open_file.pid = pid;
open_file.fd = object.as_object().get_deprecated("fd"sv).to_int();
open_file.fd = object.as_object().get_integer<int>("fd"sv).value();
DeprecatedString name = object.as_object().get_deprecated("absolute_path"sv).to_deprecated_string();
DeprecatedString name = object.as_object().get_deprecated_string("absolute_path"sv).value_or({});
VERIFY(parse_name(name, open_file));
open_file.full_name = name;