[Skiboot] [PATCH] mambo: print useful error when mysim mmap fails

Ryan Grimm grimm at linux.ibm.com
Sat Aug 6 08:02:23 AEST 2022

My user id didn't have access to disk.img and the code printed
the error message:

ERROR: pmem: 'mysim mmap' command needs newer mambo

mysim mmap has been in Mambo for a while so this patch prints out the
error message from catch.  Now we get the useful:

ERROR: pmem: 'mysim mmap' Error opening file disk.img for mapping

Signed-off-by: Ryan Grimm <grimm at linux.ibm.com>
 external/mambo/skiboot.tcl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 33a892d9..6c0eb5a0 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -364,8 +364,8 @@ foreach pmem_file $pmem_files { # PMEM_DISK
     } else {
 	set pmem_mode "rw"
-    if {[catch {mysim memory mmap $pmem_start $pmem_size $pmem_file $pmem_mode}]} {
-	puts "ERROR: pmem: 'mysim mmap' command needs newer mambo"
+    if {[catch {mysim memory mmap $pmem_start $pmem_size $pmem_file $pmem_mode} err]} {
+	puts "ERROR: pmem: 'mysim mmap' $err"
     set pmem_start [pmem_node_add $pmem_root $pmem_start $pmem_size]

More information about the Skiboot mailing list