vnc: add a more descriptive error message
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 vnc: add a more descriptive error message
Quoted 10 lines · On 30/06/12 10:02, [email protected] wrote:
From: Amos Kong<[email protected]>
Currently qemu outputs some low-level error in
qemu-sockets.cwhen 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.
Quoted 8 lines
Signed-off-by Amos Kong<[email protected]>---
V2: improve the commitlog--- vl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 1 line
From
ae5d1000b1e30ab03d56f93a751b47e89f91ca41Mon Sep 17 00:00:00 2001
From: Amos Kong <[email protected]>
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.
---
V2: improve the commitlog
--- vl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
vl.c +4 -1
@@ -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));
Signature · 1 line
1.7.7.3
Quoted 10 lines · Amos Kong
Quoted 9 lines · On 30/06/12 10:02, [email protected] wrote:
From: Amos Kong<[email protected]>
Currently qemu outputs some low-level error in
qemu-sockets.cwhen 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
Quoted 11 lines · Michael Tokarev
Quoted 10 lines · Amos Kong
Quoted 9 lines · On 30/06/12 10:02, [email protected] wrote:
From: Amos Kong<[email protected]>
Currently qemu outputs some low-level error in
qemu-sockets.cwhen 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?
Quoted 7 lines
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.
----- Original Message -----
Quoted 10 lines
Quoted 8 lines · Michael Tokarev
Quoted 7 lines · Amos Kong
Quoted 6 lines · On 30/06/12 10:02, [email protected] wrote:
From: Amos Kong <[email protected]>
Currently qemu outputs some low-level error in
qemu-sockets.cwhen failed to start vnc server.
eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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.
Quoted 7 lines
Quoted 7 lines
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.
Quoted 1 line
Seconded.
Thanks, Amos.
Quoted 5 lines · Amos Kong
----- Original Message -----
Quoted 4 lines
Quoted 2 lines · Michael Tokarev
Gyus, please, pretty PLEASE stop doing things like this.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
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
The more cases like this is fixed, the better!
Thank you!
/mjt