qemu-sockets: update socket_uri() and socket_parse() to be consistent
commit7651b3211904eda3207d50f31c7f9acc8c375cec
authorLaurent Vivier <lvivier@redhat.com>
Fri, 21 Oct 2022 09:09:19 +0000 (21 11:09 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 28 Oct 2022 05:28:52 +0000 (28 13:28 +0800)
tree33ff9339e6c2c8e3d6f520e53f076d5a2df37b27
parent18bf1c94565b1b594873aaea9dfd47c83abd8543
qemu-sockets: update socket_uri() and socket_parse() to be consistent

To be consistent with socket_uri(), add 'tcp:' prefix for inet type in
socket_parse(), by default socket_parse() use tcp when no prefix is
provided (format is host:port).

In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:'
because it makes a vsock address look like an inet address with CID
misinterpreted as host.
Goes back to commit 9aca82ba31 "migration: Create socket-address parameter"

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
util/qemu-sockets.c