From patchwork Thu Mar 14 14:43:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 160338 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15594955jad; Thu, 14 Mar 2019 07:44:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzov2l357tk/gnjPdJ25lHiXrFPHcykaqAKaK/C8Dz/ufNSUy+zgMbxpsBnb9NMS7Q4urWD X-Received: by 2002:a0c:abcc:: with SMTP id k12mr4128349qvb.218.1552574676320; Thu, 14 Mar 2019 07:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574676; cv=none; d=google.com; s=arc-20160816; b=xGrMm8JjGbI9uZrf9gTMjjmTIuYlkbUl+71WB69r+5AhXDpO6828ZXl5F5oQ6FLx/4 WV0DzLtJgJCsGHa4neJ+zG+Xu6hwMlraqeoz+cbGGJik8cO7kozV1J6fAhIvWa/LGRf/ SO0xKjMXODFyJLkQ2L95wAnnFgDNuYcHAAAuF3UNuM40RCvYkUJdkI2ylDJPgsyEvxIV 44rUjOnHR3WxtfpAFE7n3PDLHx4AHtqPRC/dFV/yWgdcPpSFL4zl33jZwoQi5iXpi0dr aYtt+foesNn/SRX/ehoQD9n0NFb8+L2uOinTf6EzAJ53rcdYe1Yhf5dPeqt9DMkoERf0 5/YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=vnUW5637Hzqhm/Pj7Rk7lrSANcquUx647H2FVXO4aok=; b=zhj678mGALKeWRqApZZNp9818KYnPxn5JyRNJXHU+3yO1mBrpeG4lSb0o60o3x1p02 TkbPUePVWSjGXERQDZHPLZ/8JaX9uX7TbaWoqOhOw4h952LCmetwmN8llnYuWYg8GtkG Ujo544cF5KW6sxkgJzTGIep+2mDUfc5m+dySLZlVr7DeJMYNXulNdpJsvZgyMGTjh0s3 5XGP087nCKx394MIeAO1ZdSEGXFybxJwCjvicAufmzUP9X1rvx4mvD7Jb4JCtuOfSsWg m9wtZ97xKTG8B5rW4LfNTxJ4qw8TWQqAffPA1+rpZGhkZSsIoaEbSaSL0ajIkiXaI592 8u3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id g3si1179072qkc.91.2019.03.14.07.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 016627C83A; Thu, 14 Mar 2019 14:44:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB20017DC4; Thu, 14 Mar 2019 14:44:34 +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 8CCA43FB10; Thu, 14 Mar 2019 14:44:34 +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 x2EEiMSh024479 for ; Thu, 14 Mar 2019 10:44:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0A5B860F89; Thu, 14 Mar 2019 14:44:22 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-177.rdu2.redhat.com [10.10.124.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98CEC60BE6; Thu, 14 Mar 2019 14:44:21 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 14 Mar 2019 10:43:54 -0400 Message-Id: <5b3efbd783559ee6241167a7913943db2d4fbc0d.1552574299.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/21] qemu: add virQEMUCapsSetVList 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 14 Mar 2019 14:44:35 +0000 (UTC) It will be used in future patches Signed-off-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 14 +++++++++++--- src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4c8229fbda..a274ce7992 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1664,14 +1664,22 @@ virQEMUCapsSet(virQEMUCapsPtr qemuCaps, void -virQEMUCapsSetList(virQEMUCapsPtr qemuCaps, ...) +virQEMUCapsSetVList(virQEMUCapsPtr qemuCaps, va_list list) { - va_list list; int flag; - va_start(list, qemuCaps); while ((flag = va_arg(list, int)) < QEMU_CAPS_LAST) ignore_value(virBitmapSetBit(qemuCaps->flags, flag)); +} + + +void +virQEMUCapsSetList(virQEMUCapsPtr qemuCaps, ...) +{ + va_list list; + + va_start(list, qemuCaps); + virQEMUCapsSetVList(qemuCaps, list); va_end(list); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 06c7606e2f..3601207989 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -518,6 +518,8 @@ virQEMUCapsPtr virQEMUCapsNew(void); void virQEMUCapsSet(virQEMUCapsPtr qemuCaps, virQEMUCapsFlags flag) ATTRIBUTE_NONNULL(1); +void virQEMUCapsSetVList(virQEMUCapsPtr qemuCaps, + va_list list) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); void virQEMUCapsSetList(virQEMUCapsPtr qemuCaps, ...) ATTRIBUTE_NONNULL(1); void virQEMUCapsClear(virQEMUCapsPtr qemuCaps,