Message ID | 4FF65090.3040402@redhat.com |
---|---|
State | New |
Headers | show |
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
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.
----- 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.
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
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));