summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorUndefine <undefine@undefine.pl>2022-01-17 13:08:12 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-19 21:47:40 -0800
commit9a28ef7aa939e3d939258c8f282ae295bb7607da (patch)
tree5909de172bd2ff14576afc542829d1bfb5056676 /Userland/Applications
parentfa1d07a45dd334ac1b16a7f1e8c951a5d63ff910 (diff)
downloadserenity-9a28ef7aa939e3d939258c8f282ae295bb7607da.zip
SystemMonitor: Show unknown in PCI devices
In case when the PCI class, device or vendor is unknown, show that it is unknown instead of just putting the ID
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/SystemMonitor/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp
index 07d3c9708f..e05654c838 100644
--- a/Userland/Applications/SystemMonitor/main.cpp
+++ b/Userland/Applications/SystemMonitor/main.cpp
@@ -626,14 +626,14 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
[db](const JsonObject& object) {
auto class_id = object.get("class").to_u32();
String class_name = db ? db->get_class(class_id) : nullptr;
- return class_name.is_empty() ? String::formatted("{:04x}", class_id) : class_name;
+ return class_name.is_empty() ? String::formatted("Unknown class: {:04x}", class_id) : class_name;
});
pci_fields.empend(
"Vendor", Gfx::TextAlignment::CenterLeft,
[db](const JsonObject& object) {
auto vendor_id = object.get("vendor_id").to_u32();
String vendor_name = db ? db->get_vendor(vendor_id) : nullptr;
- return vendor_name.is_empty() ? String::formatted("{:02x}", vendor_id) : vendor_name;
+ return vendor_name.is_empty() ? String::formatted("Unknown vendor: {:02x}", vendor_id) : vendor_name;
});
pci_fields.empend(
"Device", Gfx::TextAlignment::CenterLeft,
@@ -641,7 +641,7 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
auto vendor_id = object.get("vendor_id").to_u32();
auto device_id = object.get("device_id").to_u32();
String device_name = db ? db->get_device(vendor_id, device_id) : nullptr;
- return device_name.is_empty() ? String::formatted("{:02x}", device_id) : device_name;
+ return device_name.is_empty() ? String::formatted("Unknown device: {:02x}", device_id) : device_name;
});
pci_fields.empend(
"Revision", Gfx::TextAlignment::CenterRight,