From nobody Mon Apr 29 15:58:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=qq.com ARC-Seal: i=1; a=rsa-sha256; t=1612494760; cv=none; d=zohomail.com; s=zohoarc; b=mYBJ9bBerqJHYU1YQi+tIyfPLuYL+wcJEjNybMU/duaoKykzNrlssXy4DRfeByMf92KZA2/Oo3ATGIdGqb16O/X0bfAfdN7aOHaCkvdyrUjOfF6epjQKoV1sWLCYk+AMu2XDMM5hXMPVR9zOqSB7Oe/XtT87tJPNSoBLkb7Rmlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612494760; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=XHN0iTSs27wjm+GpcLCFQgQMrjrUOa/KcnvRf6mxKdk=; b=MxZ6n/nH3W2s5U9P+aoj6pIpznslGki5tB1kqIsBHcSOt3EBWE0tY7rSl3VH7cCY7WhQDm/+4NCHKH4Spqxk9wkHdlIBMiJQsBJLZhBqVeB6X0VxGBIhYFSCpgnKr4FcxuALExFiFOfkHd+8xg0hpPixBMhHgBGyyEKC4OuDNq8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from=<274268859@qq.com> (p=none dis=none) header.from=<274268859@qq.com> Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612494760650468.01371485949505; Thu, 4 Feb 2021 19:12:40 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-167-QsMCZcmkM0-3g9CxqKDJ7A-1; Thu, 04 Feb 2021 22:12:37 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 171541020C20; Fri, 5 Feb 2021 03:12:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E28810016F9; Fri, 5 Feb 2021 03:12:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 30E5918095CB; Fri, 5 Feb 2021 03:12:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1153CFEw001221 for ; Thu, 4 Feb 2021 22:12:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 660EF2026D46; Fri, 5 Feb 2021 03:12:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E8F02026D49 for ; Fri, 5 Feb 2021 03:12:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A848080027F for ; Fri, 5 Feb 2021 03:12:12 +0000 (UTC) Received: from qq.com (out203-205-221-164.mail.qq.com [203.205.221.164]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-dp2KAm4dPdyBRuAohNYrlQ-1; Thu, 04 Feb 2021 22:12:09 -0500 Received: from localhost.localdomain ([106.120.101.58]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 2B882498; Fri, 05 Feb 2021 11:10:56 +0800 X-MC-Unique: QsMCZcmkM0-3g9CxqKDJ7A-1 X-MC-Unique: dp2KAm4dPdyBRuAohNYrlQ-1 X-QQ-mid: xmsmtpt1612494656teyp97aw7 Message-ID: X-QQ-XMAILINFO: MgmB7lY4LTHyBo70JJ8p/JT0mXcofAdeN5UZexiI3KVgXqloi4e1F+xzgQKr2i ZjYeHFCwfMPsb/bqK8nU3GSr7P0HDjn4LBlZNOvgaqLk1UIT2s8ShEj/i9ywZnLhSOy8PoSnCSby M9mibc9kUXWQRWvDjD3uPJpwo88kvkv51RujYa7p6USh9rIOQpnSQRtMtDtHv7eVQhYFJ9Ww0nvw 1BNRy272Up8/Q25XKqFRRUf2at8EzCw61o+Bk4iAvP8c4ipUPZuNt+WvNPR5CiFctoS8c7RCWvcY bYWjXFnToyMRKUAGWTCAKNrxI/gFRoHdMnGSzBSpI96rqKBZKioW+2JVCob6bAn2EjkCNjPM25Me kAivy5Hg3pLQhxrsLAANgbZYjzG9ovOMJs+ryDZwNDjUjEIESuWvcm7cr0uziWEvCD1wVky1UNh4 g1nVGOGRonoBZrDz/SsqWhlwMJOPz0mP2xDlX99u6cak2nfLW3NA/AV8ksuIAUZ5vpWkN3OiNncy 6NktWdyz2PffF6JbOrEY7NNtplkvDWR6Z52KQaLP1Gl+2bCeweifJY++OoK8b85xjsFO8ypfq+8y SWoCy1kxjgq6sRXBs23qXiVydi91dhW1UpvtHPcLHeW1FLe686ceyMbJKHXyZAt0wKK3tzyMTcdw yT+v1vedbxxVK2nPdZsJM3nKjKHtvg4fh3hk9wAxVK5AL+j1oX2wiqWy7ermYOL5o7GZIiB7jUKT Zdo7vURL3xDmuDF+nx8s25qR1J/F8C7E6rqMZKwAxGCTDoW0/zdnL8Z547RoiYRWVNEmDJjGIa7y tapJJilV2Cai589APq/gdfhgrxvpiLTls0owrSOxKk/ZomIrshhBrV/N5+9H6nW7U= From: Yalei Li <274268859@qq.com> To: libvir-list@redhat.com Subject: [PATCH] util: Remove '\n' from vhostuser ifname Date: Fri, 5 Feb 2021 11:10:51 +0800 X-OQ-MSGID: <20210205031051.3951-1-274268859@qq.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Yalei Li <274268859@qq.com>, Yalei Li X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When deleting the vhostuserclient interface, OVS prompts that the interface= does not exist, Through the XML file, I found that the "target dev" has a '\n', results in = an XML parsing error. XML file: That is because 'ovs-vsctl' returns a newline result, always come with a '\= n', and the vircommandrun function puts it in ifname. So virNetDevOpenvswitchGetVhostuserIfname should remove '\n' from ifname. Signed-off-by: Yalei Li Reviewed-by: Michal Privoznik --- src/util/virnetdevopenvswitch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index f9b3369b2a..bd840bd3b7 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -575,6 +575,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path, return 0; } =20 + virStringTrimOptionalNewline(*ifname); if (virNetDevOpenvswitchMaybeUnescapeReply(*ifname) < 0) { VIR_FREE(*ifname); return -1; --=20 2.27.0