Avoid use of deprecated Xml_node methods

Issue #3755
This commit is contained in:
Norman Feske
2020-05-06 19:06:25 +02:00
parent d22b95ded3
commit be65c4acd2
16 changed files with 196 additions and 212 deletions

View File

@ -930,14 +930,14 @@ struct Usb_devices : List<Usb_host_device>
Dev_info const dev_info(bus, dev, vendor, product);
String<128> label;
try {
node.attribute("label").value(&label);
} catch (Xml_attribute::Nonexistent_attribute) {
if (!node.has_attribute("label")) {
error("no label found for device ", dev_info);
return;
}
typedef String<128> Label;
Label const label = node.attribute_value("label", Label());
/* ignore if already created */
bool exists = false;
for_each([&] (Usb_host_device &device) {