diff --git a/repos/os/src/lib/sandbox/config_model.cc b/repos/os/src/lib/sandbox/config_model.cc index 0dbb118276..fb17b53cb5 100644 --- a/repos/os/src/lib/sandbox/config_model.cc +++ b/repos/os/src/lib/sandbox/config_model.cc @@ -21,7 +21,7 @@ struct Config_model::Node : Noncopyable, Interface, private List_model::El friend class List_model; friend class List; - static bool type_matches(Xml_node const &) { return true; } + static bool type_matches(Xml_node const &xml); virtual bool matches(Xml_node const &) const = 0; @@ -304,6 +304,20 @@ struct Config_model::Service_node : Node }; +bool Config_model::Node::type_matches(Xml_node const &xml) +{ + return Parent_provides_node::type_matches(xml) + || Default_route_node ::type_matches(xml) + || Default_node ::type_matches(xml) + || Start_node ::type_matches(xml) + || Affinity_space_node ::type_matches(xml) + || Report_node ::type_matches(xml) + || Resource_node ::type_matches(xml) + || Heartbeat_node ::type_matches(xml) + || Service_node ::type_matches(xml); +} + + void Config_model::update_from_xml(Xml_node const &xml, Allocator &alloc, Reconstructible &verbose,