From nobody Thu May 15 00:20:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517836722227871.9180279025813; Mon, 5 Feb 2018 05:18:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16A3C883B0; Mon, 5 Feb 2018 13:18:41 +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 E671F19F1F; Mon, 5 Feb 2018 13:18:40 +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 AAD824EBD7; Mon, 5 Feb 2018 13:18:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w15DIYII000306 for ; Mon, 5 Feb 2018 08:18:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0A90D18BAA; Mon, 5 Feb 2018 13:18:34 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CAB05D9CB; Mon, 5 Feb 2018 13:18:32 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 5 Feb 2018 14:17:44 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/6] util: bitmap: Add comments for functions which don't have them 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 05 Feb 2018 13:18:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" virBitmap code is thoroughly documented. Add docs for the few functions missing them. --- src/util/virbitmap.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 4229aa286e..0973731e3a 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -146,6 +146,14 @@ virBitmapFree(virBitmapPtr bitmap) } +/** + * virBitmapCopy: + * @dst: destination bitmap + * @src: source bitmap + * + * Copies contents of @src to @dst. @dst must have the same size as @src. + * Returns -1 if the size is not the same or 0 on success. + */ int virBitmapCopy(virBitmapPtr dst, virBitmapPtr src) @@ -882,6 +890,12 @@ virBitmapEqual(virBitmapPtr b1, } +/** + * virBitmapSize: + * @bitmap: virBitmap to inspect + * + * Returns number of bits @bitmap can store. + */ size_t virBitmapSize(virBitmapPtr bitmap) { @@ -1116,7 +1130,12 @@ virBitmapNextClearBit(virBitmapPtr bitmap, } -/* Return the number of bits currently set in the map. */ +/** + * virBitmapCountBits: + * @bitmap: bitmap to inspect + * + * Return the number of bits currently set in @bitmap. + */ size_t virBitmapCountBits(virBitmapPtr bitmap) { @@ -1192,6 +1211,14 @@ virBitmapDataFormat(const void *data, } +/** + * virBitmapOverlaps: + * @b1: virBitmap to inspect + * @b2: virBitmap to inspect + * + * Returns true if at least one bit with the same index is set both in @b1= and + * @b2. + */ bool virBitmapOverlaps(virBitmapPtr b1, virBitmapPtr b2) --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list