summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-05-13 12:46:47 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-05-13 12:46:48 +0100
commit082b4061a4a28549bcb22ba3bab8e477e4fca018 (patch)
tree4dc5d995a1a4106ad79d7153cad25510cd8e4c83 /util
parent04d6556c5c91d6b00c70df7b85e1715a7c7870df (diff)
parent503591cb6c28c3ddbe38ea50cab2f0dd3d6cd929 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/input-20190513-v2-pull-request' into staging
input: add vhost-user-input, virtio-input fixes. # gpg: Signature made Mon 13 May 2019 07:52:39 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/input-20190513-v2-pull-request: virtio-input: fix Kconfig dependency and Makefile virtio-input-host-pci: cleanup types util: simplify unix_listen() Add vhost-user-input-pci Add vhost-user-backend libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config libvhost-user: fix -Waddress-of-packed-member Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index ba6335e71a..8850a280a8 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -970,26 +970,12 @@ static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp)
/* compatibility wrapper */
int unix_listen(const char *str, Error **errp)
{
- char *path, *optstr;
- int sock, len;
UnixSocketAddress *saddr;
+ int sock;
saddr = g_new0(UnixSocketAddress, 1);
-
- optstr = strchr(str, ',');
- if (optstr) {
- len = optstr - str;
- if (len) {
- path = g_malloc(len+1);
- snprintf(path, len+1, "%.*s", len, str);
- saddr->path = path;
- }
- } else {
- saddr->path = g_strdup(str);
- }
-
+ saddr->path = g_strdup(str);
sock = unix_listen_saddr(saddr, errp);
-
qapi_free_UnixSocketAddress(saddr);
return sock;
}