From: Markus Armbruster <armbru@redhat.com>
To: "Cao,Bing Bu" <mars@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] creen dump not supported when no console
Date: Mon, 21 Nov 2011 13:30:43 +0100 [thread overview]
Message-ID: <m3bos5verw.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1321781468-11126-1-git-send-email-mars@linux.vnet.ibm.com> (Bing Bu Cao's message of "Sun, 20 Nov 2011 17:31:08 +0800")
"Cao,Bing Bu" <mars@linux.vnet.ibm.com> writes:
> I have tested the issue use "-vga none -nographic" option.
> QEMU segment faults.
>
> But i think there is no any text and graphic console created in this case.
> The console[0] is NULL.
>
> The vga_hw_screen_dump() should return before console_select().
> What do you think?
>
>
> ---
> console.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/console.c b/console.c
> index f6fe441..957948e 100644
> --- a/console.c
> +++ b/console.c
> @@ -184,6 +184,9 @@ void vga_hw_screen_dump(const char *filename)
> console_select(0);
> if (consoles[0] && consoles[0]->hw_screen_dump) {
> consoles[0]->hw_screen_dump(consoles[0]->hw, filename);
> + } else {
> + fprintf(stderr,"no any console,could not screen dump \n");
> + return;
> }
>
> console_select(previous_active_console->index);
Tab damage.
Subject misspells "screendump".
Error message could use some polish. Suggest "Can't screendump without
a console".
Please don't use printf & friends for output to the monitor user, it
doesn't go to the monitor unless the monitor happens to be on stdio.
Use error_printf() & friends.
Except when the command is in QMP, and you need nice error reports in
QMP. Then use qerror_report(). Yes, that's a pain to use.
Except when the command is already implemented in QAPI. Then you use
error_set() instead. Yes, that one's a PITA, too.
prev parent reply other threads:[~2011-11-21 12:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 15:47 [Qemu-devel] [PATCH] console: Fix segfault on screendump without VGA adapter Alexander Graf
2011-11-20 9:31 ` [Qemu-devel] [PATCH] creen dump not supported when no console Cao,Bing Bu
2011-11-20 11:02 ` Paolo Bonzini
2011-11-22 1:26 ` [Qemu-devel] [PATCH][V2] Can't screendump without a console Cao,Bing Bu
2011-11-21 12:30 ` Markus Armbruster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bos5verw.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=mars@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.