init: patch to log error when configuration cannot be parsed
parent
5b98e963c7
commit
2132b41ab9
|
@ -29,7 +29,7 @@ in {
|
|||
|
||||
gpt_write.portInputs = [ jitterentropy ];
|
||||
|
||||
init.patches = [ ./sandbox.patch ];
|
||||
init.patches = [ ./sandbox.patch ./xml-fail.patch ];
|
||||
|
||||
event_filter.patches = [ ./event_filter.patch ];
|
||||
|
||||
|
@ -95,7 +95,7 @@ in {
|
|||
vesa_drv.portInputs = [ libc x86emu ];
|
||||
|
||||
vfs.outputs = [ "out" "lib" ];
|
||||
vfs_audit = {};
|
||||
vfs_audit = { };
|
||||
vfs_block = { };
|
||||
vfs_import.patches = [ ./vfs_import.patch ];
|
||||
vfs_jitterentropy.portInputs = [ jitterentropy libc ];
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
From 3898cf557ada28312731292074a8a09621d45abb Mon Sep 17 00:00:00 2001
|
||||
From: Emery Hemingway <ehmry@posteo.net>
|
||||
Date: Sat, 7 Nov 2020 13:49:41 +0100
|
||||
Subject: [PATCH] init: log error when configuration cannot be parsed
|
||||
|
||||
---
|
||||
repos/os/src/init/main.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/repos/os/src/init/main.cc b/repos/os/src/init/main.cc
|
||||
index 7b69c95721..f1c1a1435a 100644
|
||||
--- a/repos/os/src/init/main.cc
|
||||
+++ b/repos/os/src/init/main.cc
|
||||
@@ -47,6 +47,10 @@ struct Init::Main : Sandbox::State_handler
|
||||
_config.update();
|
||||
|
||||
Xml_node const config = _config.xml();
|
||||
+ if (config.has_type("empty")) {
|
||||
+ error("failed to parse config ROM");
|
||||
+ return;
|
||||
+ };
|
||||
|
||||
bool reporter_enabled = false;
|
||||
config.with_sub_node("report", [&] (Xml_node report) {
|
||||
--
|
||||
2.28.0
|
||||
|
Loading…
Reference in New Issue