Cole Robinson 0ef705a265 qemu-sockets: Report explicit error if unlink fails
Consider this case:

$ ls -ld ~/root-owned/
drwx--x--x. 2 root root 4096 Apr 29 12:55 /home/crobinso/root-owned/
$ ls -l ~/root-owned/foo.sock
-rwxrwxrwx. 1 crobinso crobinso 0 Apr 29 12:55 /home/crobinso/root-owned/foo.sock

$ qemu-system-x86_64 -vnc unix:~/root-owned/foo.sock
qemu-system-x86_64: -vnc unix:/home/crobinso/root-owned/foo.sock: Failed to start VNC server: Failed to bind socket to /home/crobinso/root-owned/foo.sock: Address already in use

...which is techinically true, but the real error is that we failed to
unlink. So report it.

This may seem pathological but it's a real possibility via libvirt.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-20 10:23:08 +02:00
..
2014-11-17 11:48:56 +01:00
2015-02-10 09:27:20 +03:00
2014-01-13 14:04:53 +01:00
2015-04-30 16:05:48 +03:00
2015-02-02 16:55:10 +01:00
2015-04-30 16:05:48 +03:00
2014-10-09 15:36:15 +02:00
2014-03-13 14:42:21 +01:00
2013-04-13 19:39:59 +00:00