40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 55f35e33680287ba925accf3bddadaa46d5ff30a 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..2c93302e14 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;
|
|
+ }
|
|
|
|
+ error("ROM not found for ", args);
|
|
throw Service_denied();
|
|
}
|
|
|
|
--
|
|
2.29.2
|
|
|