diff --git a/repos/os/src/server/rom_filter/README b/repos/os/src/server/rom_filter/README index db4d559657..6e142d28f2 100644 --- a/repos/os/src/server/rom_filter/README +++ b/repos/os/src/server/rom_filter/README @@ -36,8 +36,8 @@ The '' node can contain the following sub nodes: nodes as the '' node. :'': - Copies all sub nodes named by the 'sub_node' attribute of the input ROM - specified by the 'name' attribute to the output node. + Copies the content of the input specified by the 'name' attribute to the + output node. :'': Adds an attribute with the specified 'name' and 'value'. If the node diff --git a/repos/os/src/server/rom_filter/input_rom_registry.h b/repos/os/src/server/rom_filter/input_rom_registry.h index 43eb0cc1d9..6727b146b4 100644 --- a/repos/os/src/server/rom_filter/input_rom_registry.h +++ b/repos/os/src/server/rom_filter/input_rom_registry.h @@ -429,18 +429,17 @@ class Rom_filter::Input_rom_registry } /** - * Lookup content of input with specified name + * Generate content of the specifed input * - * \throw Nonexistent_input_value + * \throw Nonexistent_input_node */ - Xml_node xml(Input_name const &input_name) const + void gen_xml(Input_name const &input_name, Genode::Xml_generator &xml) { Entry const *e = _lookup_entry_by_name(input_name); - if (!e) throw Nonexistent_input_node(); - return e->node(); + xml.append(e->node().addr(), e->node().size()); } }; diff --git a/repos/os/src/server/rom_filter/main.cc b/repos/os/src/server/rom_filter/main.cc index 184085ab50..75026c56da 100644 --- a/repos/os/src/server/rom_filter/main.cc +++ b/repos/os/src/server/rom_filter/main.cc @@ -345,23 +345,13 @@ void Rom_filter::Main::_evaluate_node(Xml_node node, Xml_generator &xml) } else if (node.has_type("input")) { - typedef Genode::String<128> String; Input_name const input_name = node.attribute_value("name", Input_name()); - String const sub_node = - node.attribute_value("sub_node", String()); - - if (!sub_node.valid()) - return; - try { - Xml_node input_node = _input_rom_registry.xml(input_name); - - input_node.for_each_sub_node(sub_node.string(), - [&] (Xml_node node) { xml.append(node.addr(), node.size()); }); - } catch (...) { } + _input_rom_registry.gen_xml(input_name, xml); } + catch (...) { } } };