From 798b49fcc30a296bd57b45f14bda22b920d4fe61 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 18 Nov 2024 18:33:07 +0100 Subject: [PATCH] vfs server: survive malformed dynamic re-config The VFS server used to respond to any invalid config by exiting. By disregarding such configurations instead, this patch makes the VFS server robust against temporary malconfiguration. --- repos/os/src/server/vfs/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index 6081b4b15f..5874ea161b 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -782,7 +782,8 @@ class Vfs_server::Root : public Genode::Root_component, void _config_update() { _config_rom.update(); - _vfs_env.root_dir().apply_config(vfs_config()); + _config_rom.xml().with_optional_sub_node("vfs", [&] (Xml_node const &config) { + _vfs_env.root_dir().apply_config(config); }); /* * The VFS configuration change may result in watch notifications