diff mbox series

[1/6] monitor/hmp-cmds.c: Clean up hmp_dumpdtb printf

Message ID 20250206151214.2947842-2-peter.maydell@linaro.org
State New
Headers show
Series hw: Centralize handling, improve error messages for -machine dumpdtb | expand

Commit Message

Peter Maydell Feb. 6, 2025, 3:12 p.m. UTC
In hmp_dumpdtb(), we print a message when the command succeeds.  This
message is missing the trailing \n, so the HMP command prompt is
printed immediately after it.  We also weren't capitalizing 'DTB', or
quoting the filename in the message.  Fix these nits.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 monitor/hmp-cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson Feb. 6, 2025, 8:46 p.m. UTC | #1
On 2/6/25 07:12, Peter Maydell wrote:
> In hmp_dumpdtb(), we print a message when the command succeeds.  This
> message is missing the trailing \n, so the HMP command prompt is
> printed immediately after it.  We also weren't capitalizing 'DTB', or
> quoting the filename in the message.  Fix these nits.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   monitor/hmp-cmds.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> index 0aa22e1ae27..ff87fd89e4d 100644
> --- a/monitor/hmp-cmds.c
> +++ b/monitor/hmp-cmds.c
> @@ -431,6 +431,6 @@ void hmp_dumpdtb(Monitor *mon, const QDict *qdict)
>           return;
>       }
>   
> -    monitor_printf(mon, "dtb dumped to %s", filename);
> +    monitor_printf(mon, "DTB dumped to '%s'\n", filename);
>   }
>   #endif

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Philippe Mathieu-Daudé Feb. 10, 2025, 10:57 a.m. UTC | #2
On 6/2/25 16:12, Peter Maydell wrote:
> In hmp_dumpdtb(), we print a message when the command succeeds.  This
> message is missing the trailing \n, so the HMP command prompt is
> printed immediately after it.  We also weren't capitalizing 'DTB', or
> quoting the filename in the message.  Fix these nits.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   monitor/hmp-cmds.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 0aa22e1ae27..ff87fd89e4d 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -431,6 +431,6 @@  void hmp_dumpdtb(Monitor *mon, const QDict *qdict)
         return;
     }
 
-    monitor_printf(mon, "dtb dumped to %s", filename);
+    monitor_printf(mon, "DTB dumped to '%s'\n", filename);
 }
 #endif