Exclude unix: from vnc call to unix_listen()
PATCH 1/1 Exclude unix: from vnc call to unix_listen()
When using an existing unix socket like:
-vnc unix:/tmp/file1Y2nY2
qemu fails to bind a unix socket because the vnc call to unix_listen includes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same way qemu-char.c does it).
Signature · 16 lines
Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx [email protected] --- When using an existing unix socket like: -vnc unix:/tmp/file1Y2nY2 qemu fails to bind a unix socket because the vnc call to unix_listen includes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same way qemu-char.c does it). Signed-off-by: Ryan Harper <[email protected]>
vnc.c +1 -1
@@ -2413,7 +2413,7 @@ int vnc_display_open(DisplayState *ds, const char *display) dpy =qemu_malloc (256 );if (strncmp (display,"unix:" ,5 ) ==0 ) {strcpy (dpy,"unix:" ); - vs->lsock =unix_listen (display, dpy+5 ,256 -5 ); + vs->lsock =unix_listen (display+5 , dpy+5 ,256 -5 ); }else { vs->lsock =inet_listen (display, dpy,256 ,SOCK_STREAM ,5900 ); }
Anthony Liguori
AppliedQuoted 8 lines · Ryan Harper
When using an existing unix socket like:
-vnc unix:/tmp/file1Y2nY2
qemu fails to bind a unix socket because the vnc call to
unix_listenincludes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same wayqemu-char.cdoes it).
Applied. Thanks.
Regards,
Anthony Liguori