From nobody Fri May 17 07:56:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1651685420; cv=none; d=zohomail.com; s=zohoarc; b=a/q8uwCROtKySOsYA6uhM4Ti1zC4vbrQ1pP2qhAo9ocx2HDkd8BJpvY2uq0D+xLhdt+SCwdtvb8W4QRCMFiy16Y7TREkhxuhuuCEdIDIdoj6pYkHgwQR5rVdqhaT3UG4H7OL44+M8BH6L8KATNo74DTEzAkS1ZPgajF+w4w1lXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651685420; h=Content-Type:Content-Transfer-Encoding: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=9Q9EhDVJ7OrI6y3Eq801gfGpa1u6yAKT7xWTpLlzfL4=; b=NspVtI2a84yH6bPnsDXvViDCcL9XpWWGuPA6EgNOglRw6F+5NvSNN+9zQlF3QLUL4gf5HBvarqTiVX8roXY2tMzNXf6oYwCsgDL0nybPlCkdVFbUKYzgu/PB9qtZQGC+8HU4f6BOWhShyWcRi0dVpXQbTHloYyP0H2tjjkibO5A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1651685420343708.9015463432689; Wed, 4 May 2022 10:30:20 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-UzKXawxAPTOOZSpb_4u7jQ-1; Wed, 04 May 2022 13:30:16 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C36F918A6590; Wed, 4 May 2022 17:30:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFB37C28101; Wed, 4 May 2022 17:30:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EB72C194707D; Wed, 4 May 2022 17:30:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6F86F1947043 for ; Wed, 4 May 2022 17:30:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 61F4E4643CA; Wed, 4 May 2022 17:30:11 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE5914643C5 for ; Wed, 4 May 2022 17:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651685419; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=9Q9EhDVJ7OrI6y3Eq801gfGpa1u6yAKT7xWTpLlzfL4=; b=KbG4cgpe7a8pUse1Pi/mrNLfw/0pMbcrWhP3kT79WZrQPx2LsLuebOCVyKDzkD4Ecv+aW+ H/817As3HZOvhgQuvkSWU09zBPLwlmnv70XK/fW0O898VEvl/oLm+ZLfUbuB4rKc6vlfRE ZvZG8+aA9fjJ3TDErHhING8uf0keel4= X-MC-Unique: UzKXawxAPTOOZSpb_4u7jQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] lib: Drop "type hint" comments Date: Wed, 4 May 2022 19:30:07 +0200 Message-Id: <20220504173008.349565-2-abologna@redhat.com> In-Reply-To: <20220504173008.349565-1-abologna@redhat.com> References: <20220504173008.349565-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1651685421841100001 Content-Type: text/plain; charset="utf-8" Their presence confuses apibuild.py, which considers them to be part of the previous comment block and so appends them verbatim to the documentation for virNetworkUpdate(). Signed-off-by: Andrea Bolognani --- src/libvirt-network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libvirt-network.c b/src/libvirt-network.c index 50c4108641..dc50f33eba 100644 --- a/src/libvirt-network.c +++ b/src/libvirt-network.c @@ -637,8 +637,8 @@ virNetworkUndefine(virNetworkPtr network) */ int virNetworkUpdate(virNetworkPtr network, - unsigned int command, /* virNetworkUpdateCommand */ - unsigned int section, /* virNetworkUpdateSection */ + unsigned int command, + unsigned int section, int parentIndex, const char *xml, unsigned int flags) --=20 2.35.1 From nobody Fri May 17 07:56:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1651685463; cv=none; d=zohomail.com; s=zohoarc; b=gJMzuDe5fNqNOMnXGEixhEXPdZQjz293pXbZ3w/ZSRKmzRKuEtZhlb3uoKirbB9CyKYD/M8BX3wQKSrqnU5C0fpRMi90unvl5M502pJp3hB7cnR+5sJ+sFiWHhQju7jPbTsfv9OhATMe2esDuwCT1LtZjDLu6nbmbReM7MQES50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651685463; h=Content-Type:Content-Transfer-Encoding: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=eUfhlw/FbcTaABvTNOceaqi2NBkcl0XxJulZ1OnCAck=; b=RSVlKUMxtBqO31PdSE9c44+NYfVYrGOvFCMddCixKDRX1nXcnLFkszoCjHo4d15JGXD5tjyWeoSyowZkzEjx80vSNDNZW0Y6wGtEbpv+5Jm7j0G9tOVd4vd1/paIWb3dMF0PZAxHqUE6eYCanGDEh1mPPzI5Ic8e806nGt0+VUE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1651685463773698.6280167555094; Wed, 4 May 2022 10:31:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-Olqpno7tNlC6-mMN0b0WlA-1; Wed, 04 May 2022 13:30:17 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9DD9B805F72; Wed, 4 May 2022 17:30:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 823E7C2811E; Wed, 4 May 2022 17:30:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4D2621947046; Wed, 4 May 2022 17:30:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 66A371947043 for ; Wed, 4 May 2022 17:30:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 336BE4643CA; Wed, 4 May 2022 17:30:12 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFA334643C9 for ; Wed, 4 May 2022 17:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651685462; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=eUfhlw/FbcTaABvTNOceaqi2NBkcl0XxJulZ1OnCAck=; b=h3Y/bqZHDmTIe5vh1OEZ/ffE5jqLs1fO8PkNI3tWJFZqDyngSlFHm3gSY2aV4r0/U7RSp0 Fw83NaJ8QOXXUAal3r7uJP4+SedmCLzOoL4UR2yQmKLqCZD0v/5cmDsaIWrkLtv0/wD3vO cPE5DT0ZQZDJbq+peIsYGe5/P5PtKgA= X-MC-Unique: Olqpno7tNlC6-mMN0b0WlA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types Date: Wed, 4 May 2022 19:30:08 +0200 Message-Id: <20220504173008.349565-3-abologna@redhat.com> In-Reply-To: <20220504173008.349565-1-abologna@redhat.com> References: <20220504173008.349565-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1651685464071100001 Content-Type: text/plain; charset="utf-8" Due to hystorical reasons, it needs to be possible to pass values from the virTypedParameterFlags and virDomainModificationImpact enumerations to a function at the same time, so it is very important that the two never overlap. Right now this is "enforced" by the presence of special comments; unfortunately, said comments are not handled correctly by apibuild.py and end up, quite confusingly, showing up as part of the documentation for symbols preceding or following them. Introduce actual entires in each enumeration for each of the overlapping values, which is more explicit and results in comments being parsed correctly. Signed-off-by: Andrea Bolognani --- include/libvirt/libvirt-common.h.in | 19 +++++++++++++++++-- include/libvirt/libvirt-domain.h | 8 ++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-common.h.in b/include/libvirt/libvirt-= common.h.in index ccdbb2a100..2f20456dfd 100644 --- a/include/libvirt/libvirt-common.h.in +++ b/include/libvirt/libvirt-common.h.in @@ -159,8 +159,23 @@ typedef enum { * Since: 0.9.8 */ typedef enum { - /* 1 << 0 is reserved for virDomainModificationImpact */ - /* 1 << 1 is reserved for virDomainModificationImpact */ + /* Reserved for virDomainModificationImpact. Do not use. + * + * Since: 8.4.0 + */ + VIR_TYPED_PARAM_RESERVED1 =3D 0, + + /* Reserved for virDomainModificationImpact. Do not use. + * + * Since: 8.4.0 + */ + VIR_TYPED_PARAM_RESERVED2 =3D 1 << 0, + + /* Reserved for virDomainModificationImpact. Do not use. + * + * Since: 8.4.0 + */ + VIR_TYPED_PARAM_RESERVED3 =3D 1 << 1, =20 /* Older servers lacked the ability to handle string typed * parameters. Attempts to set a string parameter with an older diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 2edef9c4e1..94cb4a6615 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -321,10 +321,10 @@ typedef virDomainControlInfo *virDomainControlInfoPtr; * Since: 0.9.2 */ typedef enum { - VIR_DOMAIN_AFFECT_CURRENT =3D 0, /* Affect current domain state. = (Since: 0.9.2) */ - VIR_DOMAIN_AFFECT_LIVE =3D 1 << 0, /* Affect running domain state. = (Since: 0.9.2) */ - VIR_DOMAIN_AFFECT_CONFIG =3D 1 << 1, /* Affect persistent domain stat= e. (Since: 0.9.2) */ - /* 1 << 2 is reserved for virTypedParameterFlags */ + VIR_DOMAIN_AFFECT_CURRENT =3D 0, /* Affect current domain state= . (Since: 0.9.2) */ + VIR_DOMAIN_AFFECT_LIVE =3D 1 << 0, /* Affect running domain state= . (Since: 0.9.2) */ + VIR_DOMAIN_AFFECT_CONFIG =3D 1 << 1, /* Affect persistent domain st= ate. (Since: 0.9.2) */ + VIR_DOMAIN_AFFECT_RESERVED1 =3D 1 << 2, /* Reserved for virTypedParame= terFlags. Do not use. (Since: 8.4.0) */ } virDomainModificationImpact; =20 /** --=20 2.35.1