summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Bennée2022-09-29 13:42:12 +0200
committerAlex Bennée2022-10-06 12:53:40 +0200
commitbf0c50d4aa851e78c91096f510303831a2aadaeb (patch)
treec9a32bf2cb27868452159bd243d0e28c57b247da /docs
parentpc-bios/vof: Adopt meson style Make output (diff)
downloadqemu-bf0c50d4aa851e78c91096f510303831a2aadaeb.tar.gz
qemu-bf0c50d4aa851e78c91096f510303831a2aadaeb.tar.xz
qemu-bf0c50d4aa851e78c91096f510303831a2aadaeb.zip
monitor: expose monitor_puts to rest of code
This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the _puts api. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-33-alex.bennee@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/writing-monitor-commands.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/devel/writing-monitor-commands.rst b/docs/devel/writing-monitor-commands.rst
index 4aa2bb904d..2fefedcd98 100644
--- a/docs/devel/writing-monitor-commands.rst
+++ b/docs/devel/writing-monitor-commands.rst
@@ -716,7 +716,7 @@ message. Here's the implementation of the "info roms" HMP command::
if (hmp_handle_error(mon, err)) {
return;
}
- monitor_printf(mon, "%s", info->human_readable_text);
+ monitor_puts(mon, info->human_readable_text);
}
Also, you have to add the function's prototype to the hmp.h file.