diff --git a/repos/hello_tutorial/run/hello.run b/repos/hello_tutorial/run/hello.run
index f41fabc170..244550a19d 100644
--- a/repos/hello_tutorial/run/hello.run
+++ b/repos/hello_tutorial/run/hello.run
@@ -27,7 +27,14 @@ install_config {
+
+
+
+
+
+
+
}
diff --git a/repos/hello_tutorial/src/hello/client/main.cc b/repos/hello_tutorial/src/hello/client/main.cc
index 895c511e1f..eb4f12d569 100644
--- a/repos/hello_tutorial/src/hello/client/main.cc
+++ b/repos/hello_tutorial/src/hello/client/main.cc
@@ -14,17 +14,57 @@
#include
#include
+#include
#include
+struct HelloClient {
+ Genode::Env &_env;
+ Hello::Connection &_hello;
-void Component::construct(Genode::Env &env)
+ int _a;
+ int _b;
+
+ Genode::Attached_rom_dataspace _config{_env, "config"};
+
+
+ void _handle_config()
+ {
+ Genode::log("Reading config");
+ _config.update();
+
+ if (!_config.valid()) {
+ Genode::log("Config is invalid.");
+ return;
+ }
+
+ _a = _config.xml().attribute_value("a", 2);
+ _b = _config.xml().attribute_value("b", 5);
+ }
+
+ Genode::Signal_handler _config_handler {
+ _env.ep(), *this, &HelloClient::_handle_config
+ };
+
+ void run()
+ {
+ _hello.say_hello();
+
+ int const sum = _hello.add(_a, _b);
+ Genode::log("added ", _a, " + ", _b, " = ", sum);
+
+ Genode::log("hello test completed.");
+ }
+
+ HelloClient(Genode::Env &env, Hello::Connection &conn) : _env(env), _hello(conn)
+ {}
+};
+
+void
+Component::construct(Genode::Env &env)
{
Hello::Connection hello(env);
- hello.say_hello();
+ HelloClient client(env, hello);
+ client.run();
- int const sum = hello.add(2, 5);
- Genode::log("added 2 + 5 = ", sum);
-
- Genode::log("hello test completed");
}