From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx5MM-0007ir-M9 for qemu-devel@nongnu.org; Thu, 20 Oct 2016 00:53:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bx5MH-0008KO-Uw for qemu-devel@nongnu.org; Thu, 20 Oct 2016 00:53:42 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:4598) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1bx5MG-0008GF-Qa for qemu-devel@nongnu.org; Thu, 20 Oct 2016 00:53:37 -0400 References: <1475208369-13756-1-git-send-email-zhang.zhanghailiang@huawei.com> <00367569-b7b1-18bd-9dd4-5fad4215e879@redhat.com> From: Hailiang Zhang Message-ID: <58084D8C.4080000@huawei.com> Date: Thu, 20 Oct 2016 12:52:28 +0800 MIME-Version: 1.0 In-Reply-To: <00367569-b7b1-18bd-9dd4-5fad4215e879@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang , lizhijian@cn.fujitsu.com, zhangchen.fnst@cn.fujitsu.com Cc: qemu-devel@nongnu.org Hi Jason, On 2016/10/20 10:12, Jason Wang wrote: > > > On 2016年09月30日 12:06, zhanghailiang wrote: >> find_and_check_chardev() uses 'opts' member of CharDriverState to >> check if the chardev is 'socket' chardev or not, which the opts >> will be NULL if We add the chardev by qmp 'chardev-add' command. >> >> All the related info can be found in 'filename' member of CharDriverState, >> For tcp socket device, it will be like 'disconnected:tcp:9.61.1.8:9004,server' >> or 'tcp:9.61.1.8:9001,server <-> 9.61.1.8:50256', we can simply check it to >> identify if it is a tcp socket char device. >> >> Besides, fix this helper function to return -1 while some errors happen. >> >> Signed-off-by: zhanghailiang > > Do we have similar issue in net_vhost_chardev_opts() ? > Yes, you are right, both of them have been fixed by another patch 'net: don't poke at chardev internal QemuOpts' I have replied in another email.