From nobody Mon Feb 9 01:16:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1577855248; cv=none; d=zohomail.com; s=zohoarc; b=N/3dRz6S9XSffoGK35akmP7l1QHY0iJ1eoMgpJuEnOeMqIzad4wKl8w/yiSN4E3DChfny4o9gW9F9v2p+3Jjk3FRUQb/CmYJX342rS6+TR393fuYNfexGdfbM86S6RZ4rwDD7M8vuoZy4S2PGHG5bPzR5KrbCPWK+uhHAXC2Kvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1577855248; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=A1rTfyccFHzt9PcUeEuw+L7hxlIIvzjeVaM1434HG2c=; b=mNWKKYdYvdtJ1xB27kCi7EEzRGeKFjDgz9YyaEuL6PYrH85Tzh5xynwa0wwKFXzCZ2quX98bvhFJMH01nPwGVUyRQXlN64/bC+p8uWsu3MfpkQqWFgD91ncm8PMQJlwQmj8uJ8/o76a25v8jKGGXBHGAFMr8qhrmRG+vOdakfOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1577855248248375.4977949029178; Tue, 31 Dec 2019 21:07:28 -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-277--ragc8MIOxSUorQRz2SFBA-1; Wed, 01 Jan 2020 00:07:25 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F27AA801E7E; Wed, 1 Jan 2020 05:07:19 +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 CE56B5C1B2; Wed, 1 Jan 2020 05:07:19 +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 8BFA518089CF; Wed, 1 Jan 2020 05:07:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00156rp8012290 for ; Wed, 1 Jan 2020 00:06:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8F26960BF4; Wed, 1 Jan 2020 05:06:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-42.pek2.redhat.com [10.72.12.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9BD260BEC; Wed, 1 Jan 2020 05:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1577855247; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=A1rTfyccFHzt9PcUeEuw+L7hxlIIvzjeVaM1434HG2c=; b=N2rjUXwoRJcaCYu1+zVraZpDAm2f433vidaR4KNOaTeMLvr+fbZjHOPm5HAg7uST5Aubjp PO6V5XVKeL+yZLx52hBaasXpe9KG0owXKLIheipLgJR0I6HxR4HuzaOZDJ0304t3T/6I1S TgT63LrO+gwyu/nj8um5SCaWIBUtZuU= From: Han Han To: libvir-list@redhat.com Date: Wed, 1 Jan 2020 13:06:32 +0800 Message-Id: <20200101050637.1292037-3-hhan@redhat.com> In-Reply-To: <20200101050637.1292037-1-hhan@redhat.com> References: <20200101050637.1292037-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Han Han , Han Han Subject: [libvirt] [PATCH 2/7] util: Do not assume comma after object id 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.79 on 10.5.11.16 X-MC-Unique: -ragc8MIOxSUorQRz2SFBA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Han Han For qemu object like rng-builtin, there are no properties after id property. We should always set comma after object id. Otherwise it will cause trailing comma on object: -object rng-builtin,id=3DID, Signed-off-by: Han Han --- src/util/virqemu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util/virqemu.c b/src/util/virqemu.c index f3a233af..72151e43 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -239,12 +239,13 @@ virQEMUBuildObjectCommandlineFromJSONInternal(virBuff= erPtr buf, return -1; } =20 - virBufferAsprintf(buf, "%s,id=3D%s,", type, alias); - - if (props && - virQEMUBuildCommandLineJSON(props, buf, - virQEMUBuildCommandLineJSONArrayBitmap= ) < 0) - return -1; + virBufferAsprintf(buf, "%s,id=3D%s", type, alias); + if (props) { + virBufferAsprintf(buf, ","); + if (virQEMUBuildCommandLineJSON(props, buf, + virQEMUBuildCommandLineJSONArrayBitmap) < = 0) + return -1; + } =20 return 0; } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list