* [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
[not found] ` <1341021740-11426-1-git-send-email-akong@redhat.com>
@ 2012-07-06 2:42 ` Amos Kong
2012-07-06 6:45 ` Michael Tokarev
0 siblings, 1 reply; 5+ messages in thread
From: Amos Kong @ 2012-07-06 2:42 UTC (permalink / raw)
To: akong; +Cc: qemu-trivial, aliguori, pkrempa, qemu-devel
[-- 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
2012-07-06 2:42 ` [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message Amos Kong
@ 2012-07-06 6:45 ` Michael Tokarev
2012-07-06 7:31 ` Markus Armbruster
0 siblings, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2012-07-06 6:45 UTC (permalink / raw)
To: Amos Kong; +Cc: qemu-trivial, aliguori, pkrempa, qemu-devel
On 06.07.2012 06:42, Amos Kong wrote:
> 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.
Gyus, please, pretty PLEASE stop doing things like this.
Amos, your patch does TWO things. One is to clarify error
message as correctly stated in your description, and second
is to change the code to do exit(1) if this message is
generated. So, please, a) add the second fact to the
description, and b) mention why it is needed.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
2012-07-06 6:45 ` Michael Tokarev
@ 2012-07-06 7:31 ` Markus Armbruster
2012-07-06 8:09 ` Amos Kong
0 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2012-07-06 7:31 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-trivial, aliguori, Amos Kong, pkrempa, qemu-devel
Michael Tokarev <mjt@tls.msk.ru> writes:
> On 06.07.2012 06:42, Amos Kong wrote:
>> 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.
Only libvirt users? Really?
> Gyus, please, pretty PLEASE stop doing things like this.
>
> Amos, your patch does TWO things. One is to clarify error
> message as correctly stated in your description, and second
> is to change the code to do exit(1) if this message is
> generated. So, please, a) add the second fact to the
> description, and b) mention why it is needed.
Seconded.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
2012-07-06 7:31 ` Markus Armbruster
@ 2012-07-06 8:09 ` Amos Kong
2012-07-06 8:14 ` Michael Tokarev
0 siblings, 1 reply; 5+ messages in thread
From: Amos Kong @ 2012-07-06 8:09 UTC (permalink / raw)
To: Markus Armbruster
Cc: qemu-trivial, aliguori, pkrempa, Michael Tokarev, qemu-devel
----- Original Message -----
> Michael Tokarev <mjt@tls.msk.ru> writes:
>
> > On 06.07.2012 06:42, Amos Kong wrote:
> >> 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.
>
> Only libvirt users? Really?
Actually, it's not clear for all users.
> > Gyus, please, pretty PLEASE stop doing things like this.
> >
> > Amos, your patch does TWO things. One is to clarify error
> > message as correctly stated in your description, and second
> > is to change the code to do exit(1) if this message is
> > generated. So, please, a) add the second fact to the
> > description, and b) mention why it is needed.
'exit(1)' is the original code, my patch just add an error message.
> Seconded.
Thanks, Amos.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message
2012-07-06 8:09 ` Amos Kong
@ 2012-07-06 8:14 ` Michael Tokarev
0 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2012-07-06 8:14 UTC (permalink / raw)
To: Amos Kong; +Cc: qemu-trivial, aliguori, pkrempa, Markus Armbruster, qemu-devel
On 06.07.2012 12:09, Amos Kong wrote:
> ----- Original Message -----
>> Michael Tokarev <mjt@tls.msk.ru> writes:
>>> Gyus, please, pretty PLEASE stop doing things like this.
>>>
>>> Amos, your patch does TWO things. One is to clarify error
>>> message as correctly stated in your description, and second
>>> is to change the code to do exit(1) if this message is
>>> generated. So, please, a) add the second fact to the
>>> description, and b) mention why it is needed.
>
>
> 'exit(1)' is the original code, my patch just add an error message.
Amos, I'm sorry for that -- it is my ENOCOFFEE case of misreading
the patch. I read it initially as you've added the "exit" line,
but you actually added the "}" line. So indeed, this is the right
fix and the description matches what the patch does.
I've seen quite alot of cases when the description was like "clarifying
message" or "moving the code to a separate file", but at the same time
other things has changed, and often changed in a wrong way...
So, yes, it is a very good, and trivial, change, and you may use my
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
The more cases like this is fixed, the better!
Thank you!
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-06 8:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [Qemu-devel] [PATCH v2] vnc: add a more descriptive error message Amos Kong
2012-07-06 6:45 ` Michael Tokarev
2012-07-06 7:31 ` Markus Armbruster
2012-07-06 8:09 ` Amos Kong
2012-07-06 8:14 ` Michael Tokarev
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).