From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaSkk-00028J-U6 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaSkg-0007qp-VH for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaSkg-0007qC-Ob for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:02 -0500 From: Markus Armbruster Date: Mon, 29 Feb 2016 19:40:42 +0100 Message-Id: <1456771254-17511-27-git-send-email-armbru@redhat.com> In-Reply-To: <1456771254-17511-1-git-send-email-armbru@redhat.com> References: <1456771254-17511-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 26/38] ivshmem: Drop the hackish test for UNIX domain chardev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca, mlureau@redhat.com, david.marchand@6wind.com, pbonzini@redhat.com The chardev must be capable of transmitting SCM_RIGHTS ancillary messages. We check it by comparing CharDriverState member filename to "unix:". That's almost as brittle as it is disgusting. When the actual transmission all happened asynchronously, this check was all we could do in realize(), and thus better than nothing. But now we receive at least one SCM_RIGHTS synchronously in realize(), it's not worth its keep anymore. Drop it. Signed-off-by: Markus Armbruster --- hw/misc/ivshmem.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 8f976ca..e578b8a 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -961,15 +961,6 @@ static void pci_ivshmem_realize(PCIDevice *dev, Error **errp) memory_region_add_subregion(&s->bar, 0, mr); pci_register_bar(PCI_DEVICE(s), 2, attr, &s->bar); } else if (s->server_chr != NULL) { - /* FIXME do not rely on what chr drivers put into filename */ - if (strncmp(s->server_chr->filename, "unix:", 5)) { - error_setg(errp, "chardev is not a unix client socket"); - return; - } - - /* if we get a UNIX socket as the parameter we will talk - * to the ivshmem server to receive the memory region */ - IVSHMEM_DPRINTF("using shared memory server (socket = %s)\n", s->server_chr->filename); -- 2.4.3