From: Amos Kong <akong@redhat.com>
To: akong@redhat.com
Cc: qemu-trivial@nongnu.org, aliguori@us.ibm.com, pkrempa@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
Date: Fri, 06 Jul 2012 10:42:24 +0800 [thread overview]
Message-ID: <4FF65090.3040402@redhat.com> (raw)
In-Reply-To: <1341021740-11426-1-git-send-email-akong@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
On 30/06/12 10:02, akong@redhat.com wrote:
> From: Amos Kong<akong@redhat.com>
>
> Currently qemu outputs some low-level error in qemu-sockets.c
> when failed to start vnc server.
> eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
>
> Some libvirt users could not know what's happened with this
> unclear error message. This patch added a more descriptive
> error message.
>
> Signed-off-by: Amos Kong<akong@redhat.com>
>
> ---
> V2: improve the commitlog
> ---
> vl.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
CC: qemu-trivial@nongnu.org
[-- Attachment #2: 0001-vnc-add-a-more-descriptive-error-message.patch --]
[-- Type: text/plain, Size: 1249 bytes --]
>From ae5d1000b1e30ab03d56f93a751b47e89f91ca41 Mon Sep 17 00:00:00 2001
From: Amos Kong <akong@redhat.com>
Date: Sat, 30 Jun 2012 10:02:20 +0800
Subject: [PATCH v2] vnc: add a more descriptive error message
Currently qemu outputs some low-level error in qemu-sockets.c
when failed to start vnc server.
eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
Some libvirt users could not know what's happened with this
unclear error message. This patch added a more descriptive
error message.
Signed-off-by: Amos Kong <akong@redhat.com>
---
V2: improve the commitlog
---
vl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/vl.c b/vl.c
index 23ab3a3..cea97be 100644
--- a/vl.c
+++ b/vl.c
@@ -3583,8 +3583,11 @@ int main(int argc, char **argv, char **envp)
/* init remote displays */
if (vnc_display) {
vnc_display_init(ds);
- if (vnc_display_open(ds, vnc_display) < 0)
+ if (vnc_display_open(ds, vnc_display) < 0) {
+ fprintf(stderr, "Failed to start VNC server on `%s'\n",
+ vnc_display);
exit(1);
+ }
if (show_vnc_port) {
printf("VNC server running on `%s'\n", vnc_display_local_addr(ds));
--
1.7.7.3
next parent reply other threads:[~2012-07-06 2:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1341021237-11293-1-git-send-email-akong@redhat.com>
[not found] ` <1341021740-11426-1-git-send-email-akong@redhat.com>
2012-07-06 2:42 ` Amos Kong [this message]
2012-07-06 6:45 ` [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message Michael Tokarev
2012-07-06 7:31 ` Markus Armbruster
2012-07-06 8:09 ` Amos Kong
2012-07-06 8:14 ` Michael Tokarev
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=4FF65090.3040402@redhat.com \
--to=akong@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).