core: patch to log ROM when diag is set
parent
df5be1d6dc
commit
e9407c3e5d
|
@ -0,0 +1,39 @@
|
|||
From e5da4aa414e19b808e544e7bd89888cc7a3b85d3 Mon Sep 17 00:00:00 2001
|
||||
From: Emery Hemingway <ehmry@posteo.net>
|
||||
Date: Sat, 7 Nov 2020 08:37:29 +0100
|
||||
Subject: [PATCH] core: log ROM requests with affirmative "diag" flag
|
||||
|
||||
---
|
||||
repos/base/src/core/include/rom_session_component.h | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/base/src/core/include/rom_session_component.h b/repos/base/src/core/include/rom_session_component.h
|
||||
index c584701f5f..2c9623afcf 100644
|
||||
--- a/repos/base/src/core/include/rom_session_component.h
|
||||
+++ b/repos/base/src/core/include/rom_session_component.h
|
||||
@@ -35,12 +35,20 @@ namespace Genode {
|
||||
{
|
||||
/* extract label */
|
||||
Session_label const label = label_from_args(args);
|
||||
+ auto const name = label.last_element();
|
||||
+
|
||||
+ /* extract diag flag */
|
||||
+ bool diag = session_diag_from_args(args).enabled;
|
||||
|
||||
/* find ROM module for trailing label element */
|
||||
- Rom_module const * rom = rom_fs.find(label.last_element().string());
|
||||
- if (rom)
|
||||
+ Rom_module const * rom = rom_fs.find(name.string());
|
||||
+
|
||||
+ if (rom) {
|
||||
+ if (diag) log("serve ROM \"", name, "\" to \"", label, "\"");
|
||||
return *rom;
|
||||
+ }
|
||||
|
||||
+ if (diag) error("ROM \"", name, "\" not found for \"", label, "\"");
|
||||
throw Service_denied();
|
||||
}
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
|
@ -296,7 +296,7 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
basePatches = [ ./cxx-align.patch ];
|
||||
basePatches = [ ./cxx-align.patch ./core-diag.patch ];
|
||||
|
||||
in makePackages // depotPackages // {
|
||||
|
||||
|
|
Loading…
Reference in New Issue