char-socket: Fix qemu_chr_socket_address() for abstract sockets
Commit 776b97d360
"qemu-sockets: add abstract UNIX domain socket
support" neglected to update qemu_chr_socket_address(). It shows
shows neither @abstract nor @tight. Fix that.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3b14b4ec49
commit
dea7cd1794
@ -443,10 +443,22 @@ static char *qemu_chr_socket_address(SocketChardev *s, const char *prefix)
|
||||
s->is_listen ? ",server" : "");
|
||||
break;
|
||||
case SOCKET_ADDRESS_TYPE_UNIX:
|
||||
return g_strdup_printf("%sunix:%s%s", prefix,
|
||||
s->addr->u.q_unix.path,
|
||||
{
|
||||
const char *tight = "", *abstract = "";
|
||||
UnixSocketAddress *sa = &s->addr->u.q_unix;
|
||||
|
||||
if (sa->has_abstract && sa->abstract) {
|
||||
abstract = ",abstract";
|
||||
if (sa->has_tight && sa->tight) {
|
||||
tight = ",tight";
|
||||
}
|
||||
}
|
||||
|
||||
return g_strdup_printf("%sunix:%s%s%s%s", prefix, sa->path,
|
||||
abstract, tight,
|
||||
s->is_listen ? ",server" : "");
|
||||
break;
|
||||
}
|
||||
case SOCKET_ADDRESS_TYPE_FD:
|
||||
return g_strdup_printf("%sfd:%s%s", prefix, s->addr->u.fd.str,
|
||||
s->is_listen ? ",server" : "");
|
||||
|
Loading…
Reference in New Issue
Block a user