From f859cd11bd8b02bdfc17db69deefe0bf14add610 Mon Sep 17 00:00:00 2001 From: Peter Krummenacher Date: Thu, 14 Jul 2022 11:38:11 +0200 Subject: [PATCH] rom_filter: support sub nodes outside of Fixes #4560 --- repos/os/src/server/rom_filter/README | 4 ++++ repos/os/src/server/rom_filter/main.cc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/repos/os/src/server/rom_filter/README b/repos/os/src/server/rom_filter/README index cfb64aee3e..c81d52e6b3 100644 --- a/repos/os/src/server/rom_filter/README +++ b/repos/os/src/server/rom_filter/README @@ -48,6 +48,10 @@ The '' node can contain the following sub nodes: has an 'input' attribute, the content of the specified input is taken as attribute value. +:'': + Adds a sub node with the specified 'type'. The content of is evaluated + to generate the content of the added sub node. + Conditions ---------- diff --git a/repos/os/src/server/rom_filter/main.cc b/repos/os/src/server/rom_filter/main.cc index c0cfdad1ef..922136b04e 100644 --- a/repos/os/src/server/rom_filter/main.cc +++ b/repos/os/src/server/rom_filter/main.cc @@ -321,6 +321,12 @@ void Rom_filter::Main::_evaluate_node(Xml_node node, Xml_generator &xml) } } else + if (node.has_type("node")) { + xml.node(node.attribute_value("type", Genode::String<128>()).string(), [&]() { + _evaluate_node(node, xml); + }); + } else + if (node.has_type("inline")) { node.with_raw_content([&] (char const *src, size_t len) {