These functions fail when @stream is null and the current monitor isn't HMP.
Signed-off-by: Markus Armbruster <[email protected]> Message-ID: <[email protected]> [Comments rewritten in review] --- util/qemu-print.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util/qemu-print.c b/util/qemu-print.c index 4a30cd1a8e..7b9591035e 100644 --- a/util/qemu-print.c +++ b/util/qemu-print.c @@ -44,7 +44,10 @@ int qemu_printf(const char *fmt, ...) /* * Print like vfprintf() - * Print to @stream if non-null, else to current monitor. + * Print to @stream if non-null, else to current HMP monitor if we + * have one, else fail without printing anything. + * Return number of characters printed on success, negative value on + * error. */ int qemu_vfprintf(FILE *stream, const char *fmt, va_list ap) { @@ -56,7 +59,10 @@ int qemu_vfprintf(FILE *stream, const char *fmt, va_list ap) /* * Print like fprintf(). - * Print to @stream if non-null, else to current monitor. + * Print to @stream if non-null, else to current HMP monitor if we + * have one, else fail without printing anything. + * Return number of characters printed on success, negative value on + * error. */ int qemu_fprintf(FILE *stream, const char *fmt, ...) { -- 2.53.0
