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

Dan Horák dan at danny.cz
Tue Aug 9 03:11:10 AEST 2022


On Fri,  5 Aug 2022 18:02:23 -0400
Ryan Grimm <grimm at linux.ibm.com> wrote:

> 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>

LGTM

Reviewed-by: Dan Horák <dan at danny.cz>


		Dan

> ---
>  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"
>  	exit
>      }
>      set pmem_start [pmem_node_add $pmem_root $pmem_start $pmem_size]
> -- 
> 2.31.1
> 
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list