From nobody Tue Apr 30 07:28:44 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500634339440974.4671377703218; Fri, 21 Jul 2017 03:52:19 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 131A2461F9; Fri, 21 Jul 2017 10:52:16 +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 8242D5C888; Fri, 21 Jul 2017 10:52:15 +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 9C1724BB79; Fri, 21 Jul 2017 10:52:14 +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 v6LAqDDV028395 for ; Fri, 21 Jul 2017 06:52:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 509BF60F84; Fri, 21 Jul 2017 10:52:13 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9B8C80E14 for ; Fri, 21 Jul 2017 10:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 131A2461F9 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 131A2461F9 From: Michal Privoznik To: libvir-list@redhat.com Date: Fri, 21 Jul 2017 12:52:06 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] libvirt-domain.h: Fix enum description placement 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 21 Jul 2017 10:52:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There are only two acceptable places for describing enum values. It's either: typedef enum { /* Some long description. Therefore it's placed before * the value. */ VIR_ENUM_A_VAL =3D 1, } virEnumA; or: typedef enum { VIR_ENUM_B_VAL =3D 1, /* Some short description */ } virEnumB; However, during review of a patch sent upstream I realized that is not always the case. I went through all the public header files and identified all the offenders. Luckily there were just two of them. Yes, this makes our HTML generated documentation broken, but that's bug of the generator. Our header files shouldn't be forced to use something we don't want to. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrange --- include/libvirt/libvirt-domain.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 45f939a8c..a3bb9cbe9 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2309,21 +2309,21 @@ int virDomainSetPerfEvents(virDomainPtr dom, typedef enum { VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN =3D 0, /* Placeholder */ =20 - VIR_DOMAIN_BLOCK_JOB_TYPE_PULL =3D 1, /* Block Pull (virDomainBlockPull, or virDomainBlockRebase without * flags), job ends on completion */ + VIR_DOMAIN_BLOCK_JOB_TYPE_PULL =3D 1, =20 - VIR_DOMAIN_BLOCK_JOB_TYPE_COPY =3D 2, /* Block Copy (virDomainBlockCopy, or virDomainBlockRebase with * flags), job exists as long as mirroring is active */ + VIR_DOMAIN_BLOCK_JOB_TYPE_COPY =3D 2, =20 - VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT =3D 3, /* Block Commit (virDomainBlockCommit without flags), job ends on * completion */ + VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT =3D 3, =20 - VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT =3D 4, /* Active Block Commit (virDomainBlockCommit with flags), job * exists as long as sync is active */ + VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT =3D 4, =20 # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_BLOCK_JOB_TYPE_LAST @@ -3712,12 +3712,13 @@ typedef void (*virConnectDomainEventBlockJobCallbac= k)(virConnectPtr conn, * The reason describing why this callback is called */ typedef enum { - VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START =3D 0, - /* removable media changed to empty according to startup policy as sou= rce + /* Removable media changed to empty according to startup policy as sou= rce * was missing. oldSrcPath is set, newSrcPath is NULL */ - VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START =3D 1, - /* disk was dropped from domain as source file was missing. + VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START =3D 0, + + /* Disk was dropped from domain as source file was missing. * oldSrcPath is set, newSrcPath is NULL */ + VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START =3D 1, =20 # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_DISK_CHANGE_LAST --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list