mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-12 13:48:30 +00:00
rom_filter: make verbosity configurable
This commit is contained in:
parent
552662d594
commit
30f96657f1
@ -184,9 +184,6 @@ class Rom_filter::Input_rom_registry
|
||||
Node_type_name expected = _top_level_node_type(input_node);
|
||||
if (content_node.has_type(expected.string()))
|
||||
return _query_value(input_node.sub_node(), content_node);
|
||||
else
|
||||
Genode::warning("top-level node <", expected, "> "
|
||||
"missing in input ROM ", name());
|
||||
|
||||
} catch (...) { }
|
||||
|
||||
|
@ -176,6 +176,8 @@ struct Rom_filter::Main : Input_rom_registry::Input_rom_changed_fn,
|
||||
|
||||
Genode::Attached_rom_dataspace _config { _env, "config" };
|
||||
|
||||
bool _verbose = false;
|
||||
|
||||
Genode::Signal_handler<Main> _config_handler =
|
||||
{ _env.ep(), *this, &Main::_handle_config };
|
||||
|
||||
@ -183,6 +185,8 @@ struct Rom_filter::Main : Input_rom_registry::Input_rom_changed_fn,
|
||||
{
|
||||
_config.update();
|
||||
|
||||
_verbose = _config.xml().attribute_value("verbose", false);
|
||||
|
||||
/*
|
||||
* Create buffer for generated XML data
|
||||
*/
|
||||
@ -269,7 +273,8 @@ void Rom_filter::Main::_evaluate_node(Xml_node node, Xml_generator &xml)
|
||||
condition_satisfied = true;
|
||||
}
|
||||
catch (Input_rom_registry::Nonexistent_input_value) {
|
||||
Genode::warning("could not obtain input value for input ", input_name);
|
||||
if (_verbose)
|
||||
Genode::warning("could not obtain input value for input ", input_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,7 +304,8 @@ void Rom_filter::Main::_evaluate_node(Xml_node node, Xml_generator &xml)
|
||||
input_value);
|
||||
}
|
||||
catch (Input_rom_registry::Nonexistent_input_value) {
|
||||
Genode::warning("could not obtain input value for input ", input_name);
|
||||
if (_verbose)
|
||||
Genode::warning("could not obtain input value for input ", input_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -383,7 +389,6 @@ void Rom_filter::Main::_evaluate()
|
||||
_xml_output_len = xml.used();
|
||||
},
|
||||
[&] () {
|
||||
Genode::log("UPGRADING XML DATASPACE");
|
||||
_xml_ds.construct(_env.ram(), _env.rm(), _xml_ds->size() + UPGRADE);
|
||||
},
|
||||
NUM_ATTEMPTS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user