From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938957; cv=none; d=zoho.com; s=zohoarc; b=iOERu5ko7x9ulsBqHwxddQK1fymnVFfXY7UPhPaUxACBkYYHMagUUkp45QxT5nC3VDrO0YLnFPjPkXRqeORXxQbyeZakJiPdW0Vi11/iZ6EyhQLh33NMGsLfc4TJTjN2kBbXvpWw9qtGDXAla56CF/AsceB5UH1IXxfaRD0IG+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938957; 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:ARC-Authentication-Results; bh=v7nm/fyu6B5QHGa/13wVKcPWWOsDXz9y8lJLRU+8bEM=; b=O+Ex5wA0URHVvWY/kHGm5/MDty2fud2ulewFY3SZqBcaFH+FvbZM2p+q5PBAO2Dsx9/4NhTp7j7ppPVkhrjUMXGor0joBtRNp3q/WD545PU3eGPm/kkL9zJyDOcZ/+FUu9JFharG1vV8mf0BoPmX+W60JTSDeWrkpxew7Hr6i/s= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938957010123.02399283966577; Fri, 7 Jun 2019 13:22:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CB32C309B146; Fri, 7 Jun 2019 20:22:29 +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 A624519C58; Fri, 7 Jun 2019 20:22:27 +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 424131806B1D; Fri, 7 Jun 2019 20:22:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKacu025654 for ; Fri, 7 Jun 2019 16:20:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 019305C206; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B51015C205 for ; Fri, 7 Jun 2019 20:20:35 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:12 -0500 Message-Id: <20190607202030.29625-2-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/19] Use #pragma once in driver headers 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 07 Jun 2019 20:22:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/driver-hypervisor.h | 12 ++++-------- src/driver-interface.h | 12 ++++-------- src/driver-network.h | 12 ++++-------- src/driver-nodedev.h | 12 ++++-------- src/driver-nwfilter.h | 12 ++++-------- src/driver-secret.h | 12 ++++-------- src/driver-state.h | 12 ++++-------- src/driver-storage.h | 12 ++++-------- src/driver-stream.h | 12 ++++-------- src/driver.h | 37 +++++++++++++++++-------------------- 10 files changed, 53 insertions(+), 92 deletions(-) diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h index 5315e33dde..b15aaa36bc 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_HYPERVISOR_H -# define LIBVIRT_DRIVER_HYPERVISOR_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvConnectURIProbe)(char **uri); @@ -1581,6 +1580,3 @@ struct _virHypervisorDriver { virDrvNodeGetSEVInfo nodeGetSEVInfo; virDrvDomainGetLaunchSecurityInfo domainGetLaunchSecurityInfo; }; - - -#endif /* LIBVIRT_DRIVER_HYPERVISOR_H */ diff --git a/src/driver-interface.h b/src/driver-interface.h index 5373f5e66a..117c93b66f 100644 --- a/src/driver-interface.h +++ b/src/driver-interface.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_INTERFACE_H -# define LIBVIRT_DRIVER_INTERFACE_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvConnectNumOfInterfaces)(virConnectPtr conn); @@ -117,6 +116,3 @@ struct _virInterfaceDriver { virDrvInterfaceChangeCommit interfaceChangeCommit; virDrvInterfaceChangeRollback interfaceChangeRollback; }; - - -#endif /* LIBVIRT_DRIVER_INTERFACE_H */ diff --git a/src/driver-network.h b/src/driver-network.h index 2715c7bfec..a4f71a8fd1 100644 --- a/src/driver-network.h +++ b/src/driver-network.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_NETWORK_H -# define LIBVIRT_DRIVER_NETWORK_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvConnectNumOfNetworks)(virConnectPtr conn); @@ -152,6 +151,3 @@ struct _virNetworkDriver { virDrvNetworkIsPersistent networkIsPersistent; virDrvNetworkGetDHCPLeases networkGetDHCPLeases; }; - - -#endif /* LIBVIRT_DRIVER_NETWORK_H */ diff --git a/src/driver-nodedev.h b/src/driver-nodedev.h index c506e846f6..d0fc7f19cf 100644 --- a/src/driver-nodedev.h +++ b/src/driver-nodedev.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_NODEDEV_H -# define LIBVIRT_DRIVER_NODEDEV_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvNodeNumOfDevices)(virConnectPtr conn, @@ -115,6 +114,3 @@ struct _virNodeDeviceDriver { virDrvNodeDeviceCreateXML nodeDeviceCreateXML; virDrvNodeDeviceDestroy nodeDeviceDestroy; }; - - -#endif /* LIBVIRT_DRIVER_NODEDEV_H */ diff --git a/src/driver-nwfilter.h b/src/driver-nwfilter.h index 7bcb823f0a..7e95622423 100644 --- a/src/driver-nwfilter.h +++ b/src/driver-nwfilter.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_NWFILTER_H -# define LIBVIRT_DRIVER_NWFILTER_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvConnectNumOfNWFilters)(virConnectPtr conn); @@ -108,6 +107,3 @@ struct _virNWFilterDriver { virDrvNWFilterBindingDelete nwfilterBindingDelete; virDrvNWFilterBindingGetXMLDesc nwfilterBindingGetXMLDesc; }; - - -#endif /* LIBVIRT_DRIVER_NWFILTER_H */ diff --git a/src/driver-secret.h b/src/driver-secret.h index 1dcae63880..125238fe7b 100644 --- a/src/driver-secret.h +++ b/src/driver-secret.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_SECRET_H -# define LIBVIRT_DRIVER_SECRET_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 enum { /* This getValue call is inside libvirt, override the "private" flag. @@ -113,6 +112,3 @@ struct _virSecretDriver { virDrvConnectSecretEventRegisterAny connectSecretEventRegisterAny; virDrvConnectSecretEventDeregisterAny connectSecretEventDeregisterAny; }; - - -#endif /* LIBVIRT_DRIVER_SECRET_H */ diff --git a/src/driver-state.h b/src/driver-state.h index a8595662af..974b2252ee 100644 --- a/src/driver-state.h +++ b/src/driver-state.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_STATE_H -# define LIBVIRT_DRIVER_STATE_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvStateInitialize)(bool privileged, @@ -49,6 +48,3 @@ struct _virStateDriver { virDrvStateReload stateReload; virDrvStateStop stateStop; }; - - -#endif /* LIBVIRT_DRIVER_STATE_H */ diff --git a/src/driver-storage.h b/src/driver-storage.h index 2a855c34d8..e11d1b7895 100644 --- a/src/driver-storage.h +++ b/src/driver-storage.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_STORAGE_H -# define LIBVIRT_DRIVER_STORAGE_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvConnectNumOfStoragePools)(virConnectPtr conn); @@ -279,6 +278,3 @@ struct _virStorageDriver { virDrvStoragePoolIsActive storagePoolIsActive; virDrvStoragePoolIsPersistent storagePoolIsPersistent; }; - - -#endif /* LIBVIRT_DRIVER_STORAGE_H */ diff --git a/src/driver-stream.h b/src/driver-stream.h index 4978f90d2d..a5b16c8c4e 100644 --- a/src/driver-stream.h +++ b/src/driver-stream.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_STREAM_H -# define LIBVIRT_DRIVER_STREAM_H +#pragma once =20 -# ifndef __VIR_DRIVER_H_INCLUDES___ -# error "Don't include this file directly, only use driver.h" -# endif +#ifndef __VIR_DRIVER_H_INCLUDES___ +# error "Don't include this file directly, only use driver.h" +#endif =20 typedef int (*virDrvStreamSend)(virStreamPtr st, @@ -92,6 +91,3 @@ struct _virStreamDriver { virDrvStreamFinish streamFinish; virDrvStreamAbort streamAbort; }; - - -#endif /* LIBVIRT_DRIVER_STREAM_H */ diff --git a/src/driver.h b/src/driver.h index 6472bd9367..3fcea0d629 100644 --- a/src/driver.h +++ b/src/driver.h @@ -19,14 +19,13 @@ * . */ =20 -#ifndef LIBVIRT_DRIVER_H -# define LIBVIRT_DRIVER_H +#pragma once =20 -# include +#include =20 -# include "internal.h" -# include "libvirt_internal.h" -# include "viruri.h" +#include "internal.h" +#include "libvirt_internal.h" +#include "viruri.h" =20 =20 /* Status codes returned from driver open call. */ @@ -56,24 +55,24 @@ typedef enum { * !=3D 0 Feature is supported. * 0 Feature is not supported. */ -# define VIR_DRV_SUPPORTS_FEATURE(drv, conn, feature) \ +#define VIR_DRV_SUPPORTS_FEATURE(drv, conn, feature) \ ((drv)->connectSupportsFeature ? \ (drv)->connectSupportsFeature((conn), (feature)) > 0 : 0) =20 =20 -# define __VIR_DRIVER_H_INCLUDES___ +#define __VIR_DRIVER_H_INCLUDES___ =20 -# include "driver-hypervisor.h" -# include "driver-interface.h" -# include "driver-network.h" -# include "driver-nodedev.h" -# include "driver-nwfilter.h" -# include "driver-secret.h" -# include "driver-state.h" -# include "driver-stream.h" -# include "driver-storage.h" +#include "driver-hypervisor.h" +#include "driver-interface.h" +#include "driver-network.h" +#include "driver-nodedev.h" +#include "driver-nwfilter.h" +#include "driver-secret.h" +#include "driver-state.h" +#include "driver-stream.h" +#include "driver-storage.h" =20 -# undef __VIR_DRIVER_H_INCLUDES___ +#undef __VIR_DRIVER_H_INCLUDES___ =20 typedef struct _virConnectDriver virConnectDriver; typedef virConnectDriver *virConnectDriverPtr; @@ -126,5 +125,3 @@ int virSetConnectNWFilter(virConnectPtr conn); int virSetConnectNodeDev(virConnectPtr conn); int virSetConnectSecret(virConnectPtr conn); int virSetConnectStorage(virConnectPtr conn); - -#endif /* LIBVIRT_DRIVER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938925; cv=none; d=zoho.com; s=zohoarc; b=H0CMc2cKI+iwFeyvhIP3v59il5zpfUWtk1h0ixf7uDxOJ62yqiejcbdjK+977FyHBK0K/+oapJcXKcOMgLBLWcxc1dswV6x+5JsqRoyDWkbsweaIazYHLGvuIY9F8UsjlCcsDCvmR6GpkFEYTPc5Q8Y2bxC8jQPhdhmyNN8hJDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938925; 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:ARC-Authentication-Results; bh=KA+4s4oLsgUT5p7zRIvu8m4+gK/NrxsAn5/gjd+bqyo=; b=PG3fORIEATCYCz0JPy2sZek5t95Edqd7jPfGFfYzoGTsHSTCl8hiODIBPe4p8/FqlIrHt75qpHs1E/YvlrDSPr2uEDeJKEJT8DKzBhL6SNFAeVchwiVa8PRsvL053FoDAHqfwbvEkFR/2sEeJHsZUdmHD24K9I7+1adWEGeJObA= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938925489194.2020478616961; Fri, 7 Jun 2019 13:22:05 -0700 (PDT) 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 AB3BAC049D67; Fri, 7 Jun 2019 20:21:57 +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 7EDE0608A5; Fri, 7 Jun 2019 20:21:55 +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 44AD8206D4; Fri, 7 Jun 2019 20:21:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKatv025659 for ; Fri, 7 Jun 2019 16:20:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 549485C221; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 205895C205 for ; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:13 -0500 Message-Id: <20190607202030.29625-3-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/19] src/access: use #pragma once in headers 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 07 Jun 2019 20:22:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/access/viraccessdriver.h | 10 +++------- src/access/viraccessdrivernop.h | 7 ++----- src/access/viraccessdriverpolkit.h | 7 ++----- src/access/viraccessdriverstack.h | 7 ++----- src/access/viraccessmanager.h | 26 +++++++++++--------------- src/access/viraccessperm.h | 11 ++++------- 6 files changed, 24 insertions(+), 44 deletions(-) diff --git a/src/access/viraccessdriver.h b/src/access/viraccessdriver.h index 2cc3950f60..9fe7428e0e 100644 --- a/src/access/viraccessdriver.h +++ b/src/access/viraccessdriver.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSDRIVER_H -# define LIBVIRT_VIRACCESSDRIVER_H +#pragma once =20 -# include "conf/domain_conf.h" -# include "access/viraccessmanager.h" +#include "conf/domain_conf.h" +#include "access/viraccessmanager.h" =20 typedef int (*virAccessDriverCheckConnectDrv)(virAccessManagerPtr manager, const char *driverName, @@ -89,6 +88,3 @@ struct _virAccessDriver { virAccessDriverCheckStoragePoolDrv checkStoragePool; virAccessDriverCheckStorageVolDrv checkStorageVol; }; - - -#endif /* LIBVIRT_VIRACCESSDRIVER_H */ diff --git a/src/access/viraccessdrivernop.h b/src/access/viraccessdriverno= p.h index d383c6f3ef..60f4cac0b7 100644 --- a/src/access/viraccessdrivernop.h +++ b/src/access/viraccessdrivernop.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSDRIVERNOP_H -# define LIBVIRT_VIRACCESSDRIVERNOP_H +#pragma once =20 -# include "access/viraccessdriver.h" +#include "access/viraccessdriver.h" =20 extern virAccessDriver accessDriverNop; - -#endif /* LIBVIRT_VIRACCESSDRIVERNOP_H */ diff --git a/src/access/viraccessdriverpolkit.h b/src/access/viraccessdrive= rpolkit.h index 4c71889824..0e52606c99 100644 --- a/src/access/viraccessdriverpolkit.h +++ b/src/access/viraccessdriverpolkit.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSDRIVERPOLKIT_H -# define LIBVIRT_VIRACCESSDRIVERPOLKIT_H +#pragma once =20 -# include "viraccessdriver.h" +#include "viraccessdriver.h" =20 extern virAccessDriver accessDriverPolkit; - -#endif /* LIBVIRT_VIRACCESSDRIVERPOLKIT_H */ diff --git a/src/access/viraccessdriverstack.h b/src/access/viraccessdriver= stack.h index 0984b21914..078da697e8 100644 --- a/src/access/viraccessdriverstack.h +++ b/src/access/viraccessdriverstack.h @@ -18,15 +18,12 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSDRIVERSTACK_H -# define LIBVIRT_VIRACCESSDRIVERSTACK_H +#pragma once =20 -# include "access/viraccessdriver.h" +#include "access/viraccessdriver.h" =20 =20 int virAccessDriverStackAppend(virAccessManagerPtr manager, virAccessManagerPtr child); =20 extern virAccessDriver accessDriverStack; - -#endif /* LIBVIRT_VIRACCESSDRIVERSTACK_H */ diff --git a/src/access/viraccessmanager.h b/src/access/viraccessmanager.h index ab5ef87585..6da41b0823 100644 --- a/src/access/viraccessmanager.h +++ b/src/access/viraccessmanager.h @@ -18,19 +18,18 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSMANAGER_H -# define LIBVIRT_VIRACCESSMANAGER_H +#pragma once =20 -# include "viridentity.h" -# include "conf/domain_conf.h" -# include "conf/network_conf.h" -# include "conf/nwfilter_conf.h" -# include "conf/node_device_conf.h" -# include "conf/storage_conf.h" -# include "conf/secret_conf.h" -# include "conf/interface_conf.h" -# include "conf/virnwfilterbindingdef.h" -# include "access/viraccessperm.h" +#include "viridentity.h" +#include "conf/domain_conf.h" +#include "conf/network_conf.h" +#include "conf/nwfilter_conf.h" +#include "conf/node_device_conf.h" +#include "conf/storage_conf.h" +#include "conf/secret_conf.h" +#include "conf/interface_conf.h" +#include "conf/virnwfilterbindingdef.h" +#include "access/viraccessperm.h" =20 typedef struct _virAccessManager virAccessManager; typedef virAccessManager *virAccessManagerPtr; @@ -91,6 +90,3 @@ int virAccessManagerCheckStorageVol(virAccessManagerPtr m= anager, virStoragePoolDefPtr pool, virStorageVolDefPtr vol, virAccessPermStorageVol perm); - - -#endif /* LIBVIRT_VIRACCESSMANAGER_H */ diff --git a/src/access/viraccessperm.h b/src/access/viraccessperm.h index ed1f7168ca..8b63d75cf7 100644 --- a/src/access/viraccessperm.h +++ b/src/access/viraccessperm.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_VIRACCESSPERM_H -# define LIBVIRT_VIRACCESSPERM_H +#pragma once =20 -# include "internal.h" -# include "virutil.h" -# include "virenum.h" +#include "internal.h" +#include "virutil.h" +#include "virenum.h" =20 typedef enum { /** @@ -699,5 +698,3 @@ VIR_ENUM_DECL(virAccessPermNWFilterBinding); VIR_ENUM_DECL(virAccessPermSecret); VIR_ENUM_DECL(virAccessPermStoragePool); VIR_ENUM_DECL(virAccessPermStorageVol); - -#endif /* LIBVIRT_VIRACCESSPERM_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938973; cv=none; d=zoho.com; s=zohoarc; b=QvHPHVp8DhNwHLBNM+B9hVb+rHYwWxm4MNEUFIimzMpJjN6ULlQZzXjeXJV9kNMat2tlcvmDDAnSkuppaYE66Li6IwadXEdI/bNrknSrhDAvEemQbNpuqTLhsoaiVWpe5pxpw4Q6RG2v9YueRyQBtZSGRP0OI2d6gLX0xNHA064= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938973; 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:ARC-Authentication-Results; bh=7YGTorZIEYYKm6nzblvgVzCh619ypvQkqdrJCiGduYY=; b=muqW76yXQgQgH455W1LSRcdkqALdA1ZSdgfuVp6UNKZL7AtOE5CJMVbOGOdf91rGFRwfhq8F0F1x7T96yGJSn5+yyZ3jWkEcVjuCHcFXHeVLlL/x/kM5eHgEWMKAXJG10E/3qbCpf0MVOg7a7hvT5uFp08XJm5qhrQ6fw8MXvH0= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938973795742.4346897467934; Fri, 7 Jun 2019 13:22:53 -0700 (PDT) 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 CEBBC22387E; Fri, 7 Jun 2019 20:22:40 +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 8A2B0600D1; Fri, 7 Jun 2019 20:22:38 +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 4D946206D1; Fri, 7 Jun 2019 20:22:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKa6Y025666 for ; Fri, 7 Jun 2019 16:20:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id A53295C206; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 727EA5C205 for ; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:14 -0500 Message-Id: <20190607202030.29625-4-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/19] src/admin: use #pragma once in headers 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: , 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.39]); Fri, 07 Jun 2019 20:22:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/admin/admin_server.h | 9 +++------ src/admin/admin_server_dispatch.h | 11 ++++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/admin/admin_server.h b/src/admin/admin_server.h index 43f2b85fc1..1d5cbec55f 100644 --- a/src/admin/admin_server.h +++ b/src/admin/admin_server.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_ADMIN_SERVER_H -# define LIBVIRT_ADMIN_SERVER_H +#pragma once =20 -# include "rpc/virnetdaemon.h" -# include "rpc/virnetserver.h" +#include "rpc/virnetdaemon.h" +#include "rpc/virnetserver.h" =20 int adminConnectListServers(virNetDaemonPtr dmn, virNetServerPtr **servers, @@ -68,5 +67,3 @@ int adminServerSetClientLimits(virNetServerPtr srv, virTypedParameterPtr params, int nparams, unsigned int flags); - -#endif /* LIBVIRT_ADMIN_SERVER_H */ diff --git a/src/admin/admin_server_dispatch.h b/src/admin/admin_server_dis= patch.h index 5316b89313..f39757a13a 100644 --- a/src/admin/admin_server_dispatch.h +++ b/src/admin/admin_server_dispatch.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_ADMIN_SERVER_DISPATCH_H -# define LIBVIRT_ADMIN_SERVER_DISPATCH_H +#pragma once =20 -# include "rpc/virnetserverprogram.h" -# include "rpc/virnetserverclient.h" -# include "admin/admin_protocol.h" +#include "rpc/virnetserverprogram.h" +#include "rpc/virnetserverclient.h" +#include "admin/admin_protocol.h" =20 =20 extern virNetServerProgramProc adminProcs[]; @@ -36,5 +35,3 @@ void *remoteAdmClientNewPostExecRestart(virNetServerClien= tPtr client, void *opaque); virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client, void *data); - -#endif /* LIBVIRT_ADMIN_SERVER_DISPATCH_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938906; cv=none; d=zoho.com; s=zohoarc; b=Y7FWlsOZYAk0JxFZWOfjYjtu1HnbmJpDr0AuhlAT/yHWOJdi/M3eGdZKjiDcsdoyjpKN/mGHAMFYANmLaqLSGjrcea2K5OQmPjKqAR5pGjXhwRQyBqdljT7PXhTNU+r9MNhQvdaBhdGkU6WVXy8o7JCp8Dn7po7Hv7kfbOHTJ0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938906; 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:ARC-Authentication-Results; bh=zS0MJ50Ylnw2vxAmnjzWKp5CKTnrp47wB6sZSyr8Czk=; b=kb/dVvS/dLjqt+22GcgwhTeFqRigmPWgYUTO8JlXqiP4N8B2ndOByWt+oMFVSz98xo3NDhkqeBPpdomDgmCQQDufxM5ovIJdwkia6sutAXiF8pt9vs/F1l55cHmJq8m0B4ohefi0XSk64XYPMi0ZCFU8zYTf7qujMk36/qyU1O4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938906853454.3580868246396; Fri, 7 Jun 2019 13:21:46 -0700 (PDT) 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 D62A4308219F; Fri, 7 Jun 2019 20:21:09 +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 733FA6085B; Fri, 7 Jun 2019 20:21:05 +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 472BA1806B16; Fri, 7 Jun 2019 20:20:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKcRP025690 for ; Fri, 7 Jun 2019 16:20:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id EDF885C206; Fri, 7 Jun 2019 20:20:38 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA2635C205 for ; Fri, 7 Jun 2019 20:20:36 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:15 -0500 Message-Id: <20190607202030.29625-5-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/19] src/bhyve: use #pragma once in headers 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 07 Jun 2019 20:21:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_capabilities.h | 11 ++++------- src/bhyve/bhyve_command.h | 15 ++++++--------- src/bhyve/bhyve_conf.h | 7 ++----- src/bhyve/bhyve_device.h | 11 ++++------- src/bhyve/bhyve_domain.h | 11 ++++------- src/bhyve/bhyve_driver.h | 9 +++------ src/bhyve/bhyve_monitor.h | 11 ++++------- src/bhyve/bhyve_parse_command.h | 5 +---- src/bhyve/bhyve_process.h | 7 ++----- src/bhyve/bhyve_utils.h | 31 ++++++++++++++----------------- 10 files changed, 44 insertions(+), 74 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h index db4aff4775..12926cf423 100644 --- a/src/bhyve/bhyve_capabilities.h +++ b/src/bhyve/bhyve_capabilities.h @@ -19,13 +19,12 @@ * */ =20 -#ifndef LIBVIRT_BHYVE_CAPABILITIES_H -# define LIBVIRT_BHYVE_CAPABILITIES_H +#pragma once =20 -# include "capabilities.h" -# include "conf/domain_capabilities.h" +#include "capabilities.h" +#include "conf/domain_capabilities.h" =20 -# include "bhyve_utils.h" +#include "bhyve_utils.h" =20 virCapsPtr virBhyveCapsBuild(void); int virBhyveDomainCapsFill(virDomainCapsPtr caps, @@ -54,5 +53,3 @@ typedef enum { =20 int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps); int virBhyveProbeCaps(unsigned int *caps); - -#endif /* LIBVIRT_BHYVE_CAPABILITIES_H */ diff --git a/src/bhyve/bhyve_command.h b/src/bhyve/bhyve_command.h index ae0f770ac2..8c39f4eb2f 100644 --- a/src/bhyve/bhyve_command.h +++ b/src/bhyve/bhyve_command.h @@ -19,16 +19,15 @@ * */ =20 -#ifndef LIBVIRT_BHYVE_COMMAND_H -# define LIBVIRT_BHYVE_COMMAND_H +#pragma once =20 -# include "bhyve_domain.h" -# include "bhyve_utils.h" +#include "bhyve_domain.h" +#include "bhyve_utils.h" =20 -# include "domain_conf.h" -# include "vircommand.h" +#include "domain_conf.h" +#include "vircommand.h" =20 -# define BHYVE_CONFIG_FORMAT_ARGV "bhyve-argv" +#define BHYVE_CONFIG_FORMAT_ARGV "bhyve-argv" =20 virCommandPtr virBhyveProcessBuildBhyveCmd(virConnectPtr conn, virDomainDefPtr def, @@ -41,5 +40,3 @@ virBhyveProcessBuildDestroyCmd(bhyveConnPtr driver, virCommandPtr virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def, const char *devmap_file, char **devicesmap_out= ); - -#endif /* LIBVIRT_BHYVE_COMMAND_H */ diff --git a/src/bhyve/bhyve_conf.h b/src/bhyve/bhyve_conf.h index eb4a2e0fb8..7dee377c76 100644 --- a/src/bhyve/bhyve_conf.h +++ b/src/bhyve/bhyve_conf.h @@ -19,10 +19,9 @@ * */ =20 -#ifndef LIBVIRT_BHYVE_CONF_H -# define LIBVIRT_BHYVE_CONF_H +#pragma once =20 -# include "bhyve_utils.h" +#include "bhyve_utils.h" =20 virBhyveDriverConfigPtr virBhyveDriverConfigNew(void); virBhyveDriverConfigPtr virBhyveDriverGetConfig(bhyveConnPtr driver); @@ -37,5 +36,3 @@ struct _bhyveDomainCmdlineDef { }; =20 void bhyveDomainCmdlineDefFree(bhyveDomainCmdlineDefPtr def); - -#endif /* LIBVIRT_BHYVE_CONF_H */ diff --git a/src/bhyve/bhyve_device.h b/src/bhyve/bhyve_device.h index 23b32e0e3e..30c08c2a61 100644 --- a/src/bhyve/bhyve_device.h +++ b/src/bhyve/bhyve_device.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_BHYVE_DEVICE_H -# define LIBVIRT_BHYVE_DEVICE_H +#pragma once =20 -# include "domain_conf.h" -# include "virpci.h" -# include "bhyve_domain.h" +#include "domain_conf.h" +#include "virpci.h" +#include "bhyve_domain.h" =20 int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, virDomainObjPtr obj= ); =20 @@ -32,5 +31,3 @@ virDomainPCIAddressSetPtr bhyveDomainPCIAddressSetCreate(= virDomainDefPtr def, =20 int bhyveDomainAssignAddresses(virDomainDefPtr def, virDomainObjPtr obj) ATTRIBUTE_NONNULL(1); - -#endif /* LIBVIRT_BHYVE_DEVICE_H */ diff --git a/src/bhyve/bhyve_domain.h b/src/bhyve/bhyve_domain.h index 03a2b369d9..17cb283e54 100644 --- a/src/bhyve/bhyve_domain.h +++ b/src/bhyve/bhyve_domain.h @@ -18,13 +18,12 @@ * . */ =20 -#ifndef LIBVIRT_BHYVE_DOMAIN_H -# define LIBVIRT_BHYVE_DOMAIN_H +#pragma once =20 -# include "domain_addr.h" -# include "domain_conf.h" +#include "domain_addr.h" +#include "domain_conf.h" =20 -# include "bhyve_monitor.h" +#include "bhyve_monitor.h" =20 typedef struct _bhyveDomainObjPrivate bhyveDomainObjPrivate; typedef bhyveDomainObjPrivate *bhyveDomainObjPrivatePtr; @@ -42,5 +41,3 @@ extern virDomainDefParserConfig virBhyveDriverDomainDefPa= rserConfig; extern virDomainXMLNamespace virBhyveDriverDomainXMLNamespace; =20 bool bhyveDomainDefNeedsISAController(virDomainDefPtr def); - -#endif /* LIBVIRT_BHYVE_DOMAIN_H */ diff --git a/src/bhyve/bhyve_driver.h b/src/bhyve/bhyve_driver.h index 36d1f8be85..98e75039a3 100644 --- a/src/bhyve/bhyve_driver.h +++ b/src/bhyve/bhyve_driver.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_BHYVE_DRIVER_H -# define LIBVIRT_BHYVE_DRIVER_H +#pragma once =20 -# include "capabilities.h" -# include "bhyve_utils.h" +#include "capabilities.h" +#include "bhyve_utils.h" =20 int bhyveRegister(void); =20 @@ -31,5 +30,3 @@ unsigned bhyveDriverGetCaps(virConnectPtr conn); unsigned bhyveDriverGetGrubCaps(virConnectPtr conn); =20 virCapsPtr bhyveDriverGetCapabilities(bhyveConnPtr driver); - -#endif /* LIBVIRT_BHYVE_DRIVER_H */ diff --git a/src/bhyve/bhyve_monitor.h b/src/bhyve/bhyve_monitor.h index 54c9e70040..226866e6d9 100644 --- a/src/bhyve/bhyve_monitor.h +++ b/src/bhyve/bhyve_monitor.h @@ -18,17 +18,14 @@ * . */ =20 -#ifndef LIBVIRT_BHYVE_MONITOR_H -# define LIBVIRT_BHYVE_MONITOR_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" -# include "bhyve_utils.h" +#include "internal.h" +#include "domain_conf.h" +#include "bhyve_utils.h" =20 typedef struct _bhyveMonitor bhyveMonitor; typedef bhyveMonitor *bhyveMonitorPtr; =20 bhyveMonitorPtr bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver); void bhyveMonitorClose(bhyveMonitorPtr mon); - -#endif /* LIBVIRT_BHYVE_MONITOR_H */ diff --git a/src/bhyve/bhyve_parse_command.h b/src/bhyve/bhyve_parse_comman= d.h index 3609107711..38521dcc55 100644 --- a/src/bhyve/bhyve_parse_command.h +++ b/src/bhyve/bhyve_parse_command.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_BHYVE_PARSE_COMMAND_H -# define LIBVIRT_BHYVE_PARSE_COMMAND_H +#pragma once =20 virDomainDefPtr bhyveParseCommandLineString(const char* nativeConfig, unsigned caps, virDomainXMLOptionPtr xmlopt); - -#endif /* LIBVIRT_BHYVE_PARSE_COMMAND_H */ diff --git a/src/bhyve/bhyve_process.h b/src/bhyve/bhyve_process.h index f9ad5b6b5a..4f62f6be4b 100644 --- a/src/bhyve/bhyve_process.h +++ b/src/bhyve/bhyve_process.h @@ -19,10 +19,9 @@ * */ =20 -#ifndef LIBVIRT_BHYVE_PROCESS_H -# define LIBVIRT_BHYVE_PROCESS_H +#pragma once =20 -# include "bhyve_utils.h" +#include "bhyve_utils.h" =20 int virBhyveProcessStart(virConnectPtr conn, bhyveConnPtr driver, @@ -44,5 +43,3 @@ void virBhyveProcessReconnectAll(bhyveConnPtr driver); typedef enum { VIR_BHYVE_PROCESS_START_AUTODESTROY =3D 1 << 0, } bhyveProcessStartFlags; - -#endif /* LIBVIRT_BHYVE_PROCESS_H */ diff --git a/src/bhyve/bhyve_utils.h b/src/bhyve/bhyve_utils.h index e915bedd87..26956d7d21 100644 --- a/src/bhyve/bhyve_utils.h +++ b/src/bhyve/bhyve_utils.h @@ -19,21 +19,20 @@ * */ =20 -#ifndef LIBVIRT_BHYVE_UTILS_H -# define LIBVIRT_BHYVE_UTILS_H - -# include "driver.h" -# include "domain_event.h" -# include "configmake.h" -# include "virdomainobjlist.h" -# include "virthread.h" -# include "virclosecallbacks.h" -# include "virportallocator.h" - -# define BHYVE_AUTOSTART_DIR SYSCONFDIR "/libvirt/bhyve/autostart" -# define BHYVE_CONFIG_DIR SYSCONFDIR "/libvirt/bhyve" -# define BHYVE_STATE_DIR LOCALSTATEDIR "/run/libvirt/bhyve" -# define BHYVE_LOG_DIR LOCALSTATEDIR "/log/libvirt/bhyve" +#pragma once + +#include "driver.h" +#include "domain_event.h" +#include "configmake.h" +#include "virdomainobjlist.h" +#include "virthread.h" +#include "virclosecallbacks.h" +#include "virportallocator.h" + +#define BHYVE_AUTOSTART_DIR SYSCONFDIR "/libvirt/bhyve/autostart" +#define BHYVE_CONFIG_DIR SYSCONFDIR "/libvirt/bhyve" +#define BHYVE_STATE_DIR LOCALSTATEDIR "/run/libvirt/bhyve" +#define BHYVE_LOG_DIR LOCALSTATEDIR "/log/libvirt/bhyve" =20 typedef struct _virBhyveDriverConfig virBhyveDriverConfig; typedef struct _virBhyveDriverConfig *virBhyveDriverConfigPtr; @@ -75,5 +74,3 @@ struct bhyveAutostartData { =20 void bhyveDriverLock(bhyveConnPtr driver); void bhyveDriverUnlock(bhyveConnPtr driver); - -#endif /* LIBVIRT_BHYVE_UTILS_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938951; cv=none; d=zoho.com; s=zohoarc; b=WyiG7UaD7q/q3ItQHAMW1K9RePrt9+6ihCNd2OCGBkwpOlET2lKY+LksI1JXgz+xCigNRnW3yNt+DB9mC1ImrANoZCdYhUsB1o4qLA1DsLq7a47+6G+5+aq7PQTwYOTuj1hB/p62Cv9HI1xrNt7gdzu1tAvymFsJ+xjPiJsOgf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938951; 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:ARC-Authentication-Results; bh=4sadZkqbJqIKDg7qU9UbWxX6M5D7gjlGZO2teZ3JyMQ=; b=cIro7K0IQDYxpm7dVXfJzLbKUM2koNx80wwWraYsmwBIKMwJhIXMLzoThVhD6+4LAkgXXBb8TZdBk1dMUHSqjqUdyK4rhRGMfvDmPxuSDf8S3WRpawV6pYN38yw2wbCTKNHuO86urXpVB/9eoO/6Wwp7Ckjq1k0KNjLbOYC4tUU= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938951996198.48751384222294; Fri, 7 Jun 2019 13:22:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 519058830A; Fri, 7 Jun 2019 20:22:21 +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 2859519C65; Fri, 7 Jun 2019 20:22:20 +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 DC9DF206D2; Fri, 7 Jun 2019 20:22:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKd3x025695 for ; Fri, 7 Jun 2019 16:20:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 49B4B5C206; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18F875C205 for ; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:16 -0500 Message-Id: <20190607202030.29625-6-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/19] conf: domain: use #pragma once in headers 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 07 Jun 2019 20:22:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_addr.h | 16 +++--- src/conf/domain_audit.h | 10 ++-- src/conf/domain_capabilities.h | 15 +++--- src/conf/domain_conf.h | 91 ++++++++++++++++------------------ src/conf/domain_event.h | 11 ++-- src/conf/domain_nwfilter.h | 5 +- 6 files changed, 65 insertions(+), 83 deletions(-) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 803d07d415..dcb90618f8 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -19,13 +19,12 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_ADDR_H -# define LIBVIRT_DOMAIN_ADDR_H +#pragma once =20 -# include "domain_conf.h" +#include "domain_conf.h" =20 -# define VIR_PCI_ADDRESS_SLOT_LAST 31 -# define VIR_PCI_ADDRESS_FUNCTION_LAST 7 +#define VIR_PCI_ADDRESS_SLOT_LAST 31 +#define VIR_PCI_ADDRESS_FUNCTION_LAST 7 =20 typedef enum { VIR_PCI_ADDRESS_EXTENSION_NONE =3D 0, /* no extension */ @@ -58,7 +57,7 @@ typedef enum { /* a combination of all bits that describe the type of connections * allowed, e.g. PCI, PCIe, switch */ -# define VIR_PCI_CONNECT_TYPES_MASK \ +#define VIR_PCI_CONNECT_TYPES_MASK \ (VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE | \ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT | \ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT | \ @@ -74,7 +73,7 @@ typedef enum { * upstream and downstream switch port, or a PCIe root port and a PCIe * port) */ -# define VIR_PCI_CONNECT_TYPES_ENDPOINT \ +#define VIR_PCI_CONNECT_TYPES_ENDPOINT \ (VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE) =20 virDomainPCIConnectFlags @@ -255,7 +254,7 @@ virDomainUSBAddressPortFormatBuf(virBufferPtr buf, unsigned int *port) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); =20 -# define VIR_DOMAIN_USB_HUB_PORTS 8 +#define VIR_DOMAIN_USB_HUB_PORTS 8 =20 typedef struct _virDomainUSBAddressHub virDomainUSBAddressHub; typedef virDomainUSBAddressHub *virDomainUSBAddressHubPtr; @@ -312,4 +311,3 @@ int virDomainUSBAddressRelease(virDomainUSBAddressSetPtr addrs, virDomainDeviceInfoPtr info) ATTRIBUTE_NONNULL(2); -#endif /* LIBVIRT_DOMAIN_ADDR_H */ diff --git a/src/conf/domain_audit.h b/src/conf/domain_audit.h index ee8a4aa70e..d34c750427 100644 --- a/src/conf/domain_audit.h +++ b/src/conf/domain_audit.h @@ -19,11 +19,10 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_AUDIT_H -# define LIBVIRT_DOMAIN_AUDIT_H +#pragma once =20 -# include "domain_conf.h" -# include "vircgroup.h" +#include "domain_conf.h" +#include "vircgroup.h" =20 void virDomainAuditStart(virDomainObjPtr vm, const char *reason, @@ -136,6 +135,3 @@ void virDomainAuditInput(virDomainObjPtr vm, const char *reason, bool success) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); - - -#endif /* LIBVIRT_DOMAIN_AUDIT_H */ diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index cd09d50cee..96ab59cae9 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -18,13 +18,12 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_CAPABILITIES_H -# define LIBVIRT_DOMAIN_CAPABILITIES_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" -# include "virautoclean.h" -# include "virenum.h" +#include "internal.h" +#include "domain_conf.h" +#include "virautoclean.h" +#include "virenum.h" =20 typedef const char * (*virDomainCapsValToStr)(int value); =20 @@ -201,7 +200,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpu= Models, const char *name); =20 =20 -# define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \ +#define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \ do { \ unsigned int __values[] =3D {__VA_ARGS__}; \ size_t __nvalues =3D ARRAY_CARDINALITY(__values); \ @@ -221,5 +220,3 @@ void virSEVCapabilitiesFree(virSEVCapability *capabilities); =20 VIR_DEFINE_AUTOPTR_FUNC(virSEVCapability, virSEVCapabilitiesFree); - -#endif /* LIBVIRT_DOMAIN_CAPABILITIES_H */ diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4c3ab07062..471c18ae19 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -20,43 +20,42 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_CONF_H -# define LIBVIRT_DOMAIN_CONF_H - -# include -# include -# include - -# include "internal.h" -# include "virconftypes.h" -# include "capabilities.h" -# include "virstorageencryption.h" -# include "cpu_conf.h" -# include "virthread.h" -# include "virhash.h" -# include "virsocketaddr.h" -# include "networkcommon_conf.h" -# include "nwfilter_params.h" -# include "numa_conf.h" -# include "virnetdevmacvlan.h" -# include "virsysinfo.h" -# include "virnetdev.h" -# include "virnetdevip.h" -# include "virnetdevvportprofile.h" -# include "virnetdevbandwidth.h" -# include "virnetdevvlan.h" -# include "virobject.h" -# include "device_conf.h" -# include "virbitmap.h" -# include "virstoragefile.h" -# include "virseclabel.h" -# include "virprocess.h" -# include "virgic.h" -# include "virperf.h" -# include "virtypedparam.h" -# include "virsavecookie.h" -# include "virresctrl.h" -# include "virenum.h" +#pragma once + +#include +#include +#include + +#include "internal.h" +#include "virconftypes.h" +#include "capabilities.h" +#include "virstorageencryption.h" +#include "cpu_conf.h" +#include "virthread.h" +#include "virhash.h" +#include "virsocketaddr.h" +#include "networkcommon_conf.h" +#include "nwfilter_params.h" +#include "numa_conf.h" +#include "virnetdevmacvlan.h" +#include "virsysinfo.h" +#include "virnetdev.h" +#include "virnetdevip.h" +#include "virnetdevvportprofile.h" +#include "virnetdevbandwidth.h" +#include "virnetdevvlan.h" +#include "virobject.h" +#include "device_conf.h" +#include "virbitmap.h" +#include "virstoragefile.h" +#include "virseclabel.h" +#include "virprocess.h" +#include "virgic.h" +#include "virperf.h" +#include "virtypedparam.h" +#include "virsavecookie.h" +#include "virresctrl.h" +#include "virenum.h" =20 /* Flags for the 'type' field in virDomainDeviceDef */ typedef enum { @@ -680,7 +679,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST } virDomainControllerModelVirtioSerial; =20 -# define IS_USB2_CONTROLLER(ctrl) \ +#define IS_USB2_CONTROLLER(ctrl) \ (((ctrl)->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) && \ ((ctrl)->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \ (ctrl)->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1 || \ @@ -1208,8 +1207,8 @@ typedef enum { VIR_DOMAIN_SMARTCARD_TYPE_LAST } virDomainSmartcardType; =20 -# define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3 -# define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb" +#define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3 +#define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb" =20 struct _virDomainSmartcardDef { int type; /* virDomainSmartcardType */ @@ -1252,7 +1251,7 @@ typedef enum { VIR_DOMAIN_TPM_VERSION_LAST } virDomainTPMVersion; =20 -# define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0" +#define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0" =20 struct _virDomainTPMDef { int type; /* virDomainTPMBackendType */ @@ -1701,7 +1700,7 @@ typedef enum { } virDomainSmbiosMode; =20 =20 -# define VIR_DOMAIN_MAX_BOOT_DEVS 4 +#define VIR_DOMAIN_MAX_BOOT_DEVS 4 =20 typedef enum { VIR_DOMAIN_BOOT_FLOPPY, @@ -1737,7 +1736,7 @@ typedef enum { VIR_DOMAIN_FEATURE_LAST } virDomainFeature; =20 -# define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12 +#define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12 =20 typedef enum { VIR_DOMAIN_HYPERV_RELAXED =3D 0, @@ -2167,7 +2166,7 @@ struct _virDomainHugePage { unsigned long long size; /* hugepage size in KiB */ }; =20 -# define VIR_DOMAIN_CPUMASK_LEN 1024 +#define VIR_DOMAIN_CPUMASK_LEN 1024 =20 struct _virDomainIOThreadIDDef { bool autofill; @@ -3042,7 +3041,7 @@ void virDomainIOThreadIDDel(virDomainDefPtr def, unsi= gned int iothread_id); * server omits the requested output, but a new flag to suppress * information could result in a security hole when older libvirt * supplies the sensitive information in spite of the flag. */ -# define VIR_DOMAIN_XML_COMMON_FLAGS \ +#define VIR_DOMAIN_XML_COMMON_FLAGS \ (VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE | \ VIR_DOMAIN_XML_MIGRATABLE) unsigned int virDomainDefFormatConvertXMLFlags(unsigned int flags); @@ -3637,5 +3636,3 @@ virDomainGraphicsGetRenderNode(const virDomainGraphic= sDef *graphics); =20 bool virDomainGraphicsNeedsAutoRenderNode(const virDomainGraphicsDef *graphics); - -#endif /* LIBVIRT_DOMAIN_CONF_H */ diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h index 637f1daf68..d1cfb81d62 100644 --- a/src/conf/domain_event.h +++ b/src/conf/domain_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_EVENT_H -# define LIBVIRT_DOMAIN_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "domain_conf.h" +#include "internal.h" +#include "object_event.h" +#include "domain_conf.h" =20 =20 virObjectEventPtr @@ -323,5 +322,3 @@ virDomainQemuMonitorEventNew(int id, unsigned int micros, const char *details) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); - -#endif /* LIBVIRT_DOMAIN_EVENT_H */ diff --git a/src/conf/domain_nwfilter.h b/src/conf/domain_nwfilter.h index 9429ee6493..f44fbcce7d 100644 --- a/src/conf/domain_nwfilter.h +++ b/src/conf/domain_nwfilter.h @@ -19,8 +19,7 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_NWFILTER_H -# define LIBVIRT_DOMAIN_NWFILTER_H +#pragma once =20 int virDomainConfNWFilterInstantiate(const char *vmname, const unsigned char *vmuuid, @@ -28,5 +27,3 @@ int virDomainConfNWFilterInstantiate(const char *vmname, bool ignoreExists); void virDomainConfNWFilterTeardown(virDomainNetDefPtr net); void virDomainConfVMNWFilterTeardown(virDomainObjPtr vm); - -#endif /* LIBVIRT_DOMAIN_NWFILTER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938941; cv=none; d=zoho.com; s=zohoarc; b=QMdqgqwsdV4Z8CVFQuPdXibZ1LLWMD/DTP5n6oBPREfSiERxn+wotMWYm6ftSQIRw+OXMbHv3sX6aLdxfvBrdiPCP8vw2fJ7y+Co/H+HHjU0QjOzZ7yOfJYN9Fay7huCXd0P+13ymKDj0cJsgFsiMtm0wk+8k9K4U5pKGeNmiw8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938941; 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:ARC-Authentication-Results; bh=U/+O+TYzDYSIJC/0mEHwwKOebcGjyD54lFHbP8P8SqE=; b=ScZYksmg2gilrECtkEH/KU0njv9y3jums4u+Co6NICSjiT1H1L50CE9izk1XY8U865QgaCpsAXiRJsyxR4FEf0Qw14qs5XfOHdF3MJslMjEx99B2ZCjGfT6dOrVWjzLFmxOCC60RTFdn1Ypm06jXXskzCFtGYFJZJfJ0BO/u7Zg= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938941722829.1811610647105; Fri, 7 Jun 2019 13:22:21 -0700 (PDT) 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 F2AE488317; Fri, 7 Jun 2019 20:21:55 +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 C5F3B600C8; Fri, 7 Jun 2019 20:21:50 +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 90BFB1806B19; Fri, 7 Jun 2019 20:21:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKd0Y025700 for ; Fri, 7 Jun 2019 16:20:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9ACA95C220; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69A5A5C205 for ; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:17 -0500 Message-Id: <20190607202030.29625-7-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/19] conf: network: use #pragma once in headers 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: , 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.28]); Fri, 07 Jun 2019 20:22:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/netdev_bandwidth_conf.h | 15 ++++---- src/conf/netdev_vlan_conf.h | 13 +++---- src/conf/netdev_vport_profile_conf.h | 14 +++----- src/conf/network_conf.h | 52 +++++++++++++--------------- src/conf/network_event.h | 11 +++--- src/conf/networkcommon_conf.h | 17 ++++----- src/conf/virnetworkobj.h | 9 ++--- 7 files changed, 55 insertions(+), 76 deletions(-) diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_c= onf.h index 7fe750ce27..c10574d0b6 100644 --- a/src/conf/netdev_bandwidth_conf.h +++ b/src/conf/netdev_bandwidth_conf.h @@ -16,14 +16,13 @@ * . */ =20 -#ifndef LIBVIRT_NETDEV_BANDWIDTH_CONF_H -# define LIBVIRT_NETDEV_BANDWIDTH_CONF_H +#pragma once =20 -# include "internal.h" -# include "virnetdevbandwidth.h" -# include "virbuffer.h" -# include "virxml.h" -# include "domain_conf.h" +#include "internal.h" +#include "virnetdevbandwidth.h" +#include "virbuffer.h" +#include "virxml.h" +#include "domain_conf.h" =20 int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth, xmlNodePtr node, @@ -56,5 +55,3 @@ static inline bool virNetDevSupportBandwidth(virDomainNet= Type type) } return false; } - -#endif /* LIBVIRT_NETDEV_BANDWIDTH_CONF_H */ diff --git a/src/conf/netdev_vlan_conf.h b/src/conf/netdev_vlan_conf.h index e3a99790eb..f798c2ae2d 100644 --- a/src/conf/netdev_vlan_conf.h +++ b/src/conf/netdev_vlan_conf.h @@ -16,15 +16,12 @@ * . */ =20 -#ifndef LIBVIRT_NETDEV_VLAN_CONF_H -# define LIBVIRT_NETDEV_VLAN_CONF_H +#pragma once =20 -# include "internal.h" -# include "virnetdevvlan.h" -# include "virbuffer.h" -# include "virxml.h" +#include "internal.h" +#include "virnetdevvlan.h" +#include "virbuffer.h" +#include "virxml.h" =20 int virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDev= VlanPtr def); int virNetDevVlanFormat(const virNetDevVlan *def, virBufferPtr buf); - -#endif /* LIBVIRT_NETDEV_VLAN_CONF_H */ diff --git a/src/conf/netdev_vport_profile_conf.h b/src/conf/netdev_vport_p= rofile_conf.h index 9044217fb0..a2989af81e 100644 --- a/src/conf/netdev_vport_profile_conf.h +++ b/src/conf/netdev_vport_profile_conf.h @@ -16,13 +16,12 @@ * . */ =20 -#ifndef LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H -# define LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H +#pragma once =20 -# include "internal.h" -# include "virnetdevvportprofile.h" -# include "virbuffer.h" -# include "virxml.h" +#include "internal.h" +#include "virnetdevvportprofile.h" +#include "virbuffer.h" +#include "virxml.h" =20 typedef enum { /* generate random defaults for interfaceID/interfaceID @@ -43,6 +42,3 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int = flags); int virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort, virBufferPtr buf); - - -#endif /* LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H */ diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index 5410a57c67..424c4b0913 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -19,28 +19,27 @@ * . */ =20 -#ifndef LIBVIRT_NETWORK_CONF_H -# define LIBVIRT_NETWORK_CONF_H - -# define DNS_RECORD_LENGTH_SRV (512 - 30) /* Limit minus overhead as men= tioned in RFC-2782 */ - -# include -# include -# include - -# include "internal.h" -# include "virthread.h" -# include "virsocketaddr.h" -# include "virnetdevbandwidth.h" -# include "virnetdevvportprofile.h" -# include "virnetdevvlan.h" -# include "virmacaddr.h" -# include "device_conf.h" -# include "virbitmap.h" -# include "networkcommon_conf.h" -# include "virobject.h" -# include "virmacmap.h" -# include "virenum.h" +#pragma once + +#define DNS_RECORD_LENGTH_SRV (512 - 30) /* Limit minus overhead as ment= ioned in RFC-2782 */ + +#include +#include +#include + +#include "internal.h" +#include "virthread.h" +#include "virsocketaddr.h" +#include "virnetdevbandwidth.h" +#include "virnetdevvportprofile.h" +#include "virnetdevvlan.h" +#include "virmacaddr.h" +#include "device_conf.h" +#include "virbitmap.h" +#include "networkcommon_conf.h" +#include "virobject.h" +#include "virmacmap.h" +#include "virenum.h" =20 typedef enum { VIR_NETWORK_FORWARD_NONE =3D 0, @@ -358,19 +357,19 @@ virNetworkSetBridgeMacAddr(virNetworkDefPtr def); =20 VIR_ENUM_DECL(virNetworkForward); =20 -# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \ +#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \ (VIR_CONNECT_LIST_NETWORKS_ACTIVE | \ VIR_CONNECT_LIST_NETWORKS_INACTIVE) =20 -# define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \ +#define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \ (VIR_CONNECT_LIST_NETWORKS_PERSISTENT | \ VIR_CONNECT_LIST_NETWORKS_TRANSIENT) =20 -# define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \ +#define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \ (VIR_CONNECT_LIST_NETWORKS_AUTOSTART | \ VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART) =20 -# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \ +#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \ (VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE | \ VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT | \ VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART) @@ -385,4 +384,3 @@ virNetworkDefUpdateSection(virNetworkDefPtr def, unsigned int flags); /* virNetworkUpdateFlags = */ =20 VIR_ENUM_DECL(virNetworkTaint); -#endif /* LIBVIRT_NETWORK_CONF_H */ diff --git a/src/conf/network_event.h b/src/conf/network_event.h index d3d17dd168..2267003970 100644 --- a/src/conf/network_event.h +++ b/src/conf/network_event.h @@ -19,12 +19,11 @@ * . */ =20 -#ifndef LIBVIRT_NETWORK_EVENT_H -# define LIBVIRT_NETWORK_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "object_event_private.h" +#include "internal.h" +#include "object_event.h" +#include "object_event_private.h" =20 int virNetworkEventStateRegisterID(virConnectPtr conn, @@ -55,5 +54,3 @@ virNetworkEventLifecycleNew(const char *name, const unsigned char *uuid, int type, int detail); - -#endif /* LIBVIRT_NETWORK_EVENT_H */ diff --git a/src/conf/networkcommon_conf.h b/src/conf/networkcommon_conf.h index b6c37a5a28..b257ffdd9c 100644 --- a/src/conf/networkcommon_conf.h +++ b/src/conf/networkcommon_conf.h @@ -20,16 +20,15 @@ * . */ =20 -#ifndef LIBVIRT_NETWORKCOMMON_CONF_H -# define LIBVIRT_NETWORKCOMMON_CONF_H +#pragma once =20 -# include -# include +#include +#include =20 -# include "internal.h" -# include "virbuffer.h" -# include "virsocketaddr.h" -# include "virnetdevip.h" +#include "internal.h" +#include "virbuffer.h" +#include "virsocketaddr.h" +#include "virnetdevip.h" =20 virNetDevIPRoutePtr virNetDevIPRouteCreate(const char *networkName, @@ -49,5 +48,3 @@ virNetDevIPRouteParseXML(const char *networkName, int virNetDevIPRouteFormat(virBufferPtr buf, const virNetDevIPRoute *def); - -#endif /* LIBVIRT_NETWORKCOMMON_CONF_H */ diff --git a/src/conf/virnetworkobj.h b/src/conf/virnetworkobj.h index 9c8f141cd9..3b296a10b3 100644 --- a/src/conf/virnetworkobj.h +++ b/src/conf/virnetworkobj.h @@ -17,12 +17,11 @@ * . */ =20 -#ifndef LIBVIRT_VIRNETWORKOBJ_H -# define LIBVIRT_VIRNETWORKOBJ_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "network_conf.h" +#include "network_conf.h" =20 typedef struct _virNetworkObj virNetworkObj; typedef virNetworkObj *virNetworkObjPtr; @@ -220,5 +219,3 @@ virNetworkObjListNumOfNetworks(virNetworkObjListPtr net= s, void virNetworkObjListPrune(virNetworkObjListPtr nets, unsigned int flags); - -#endif /* LIBVIRT_VIRNETWORKOBJ_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938958; cv=none; d=zoho.com; s=zohoarc; b=foT6FwvPoQGmceXyEgGrXLJzvKZkChFkBn87ZFBLViL6h68hleixYCddTNu+2HZO91lBlisP9t2OTvwN/OKIEz9G9W/KfwvBzysDZwLsfUAGXcH8j+bWIKAZseNAqv1lEYbGAPq7AZxTwJ+oY8JHwX/Vop0HF3LQZ/wpw5g+yG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938958; 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:ARC-Authentication-Results; bh=FZ9I9gbm/ZdWvhTagjaOdMQmU66atZxDZCs9u6Uayso=; b=MvzS8M/etWFokmHDwFGzR+Ft7J2C44JBE/drnTMur5aEeBs34WuMkSoN0CDVgYDxho/ZhOlCBDCQ0byGDM6NlF8ZAq/v/kU2RKuvG9gRxPlPQOKUb6WfaUiGgsUaliGobRh/pWZqy5kCAW0G8cT4Q/7E1JZalaGKk1GsxJLB1t4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938958817664.0930530727097; Fri, 7 Jun 2019 13:22:38 -0700 (PDT) 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 CE64C59455; Fri, 7 Jun 2019 20:22:36 +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 A7E04608A5; Fri, 7 Jun 2019 20:22:35 +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 6D2D01806B1F; Fri, 7 Jun 2019 20:22:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKeSc025708 for ; Fri, 7 Jun 2019 16:20:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 092435C220; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB6785C205 for ; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:18 -0500 Message-Id: <20190607202030.29625-8-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/19] conf: nwfilter: use #pragma once in headers 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Jun 2019 20:22:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/nwfilter_conf.h | 93 ++++++++++++++-------------- src/conf/nwfilter_ipaddrmap.h | 5 +- src/conf/nwfilter_params.h | 28 ++++----- src/conf/virnwfilterbindingdef.h | 13 ++-- src/conf/virnwfilterbindingobj.h | 11 ++-- src/conf/virnwfilterbindingobjlist.h | 8 +-- src/conf/virnwfilterobj.h | 11 ++-- 7 files changed, 73 insertions(+), 96 deletions(-) diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 4366ccc4d1..13db58e380 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -22,18 +22,17 @@ * . */ =20 -#ifndef LIBVIRT_NWFILTER_CONF_H -# define LIBVIRT_NWFILTER_CONF_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "virhash.h" -# include "virxml.h" -# include "virbuffer.h" -# include "virsocketaddr.h" -# include "virmacaddr.h" -# include "virdomainobjlist.h" -# include "virenum.h" +#include "virhash.h" +#include "virxml.h" +#include "virbuffer.h" +#include "virsocketaddr.h" +#include "virmacaddr.h" +#include "virdomainobjlist.h" +#include "virenum.h" =20 /* XXX * The config parser/structs should not be using platform specific @@ -41,21 +40,21 @@ * so temporarily define them until this can be re-written to use * locally defined enums for all constants */ -# ifndef ETHERTYPE_IP -# define ETHERTYPE_IP 0x0800 -# endif -# ifndef ETHERTYPE_ARP -# define ETHERTYPE_ARP 0x0806 -# endif -# ifndef ETHERTYPE_REVARP -# define ETHERTYPE_REVARP 0x8035 -# endif -# ifndef ETHERTYPE_IPV6 -# define ETHERTYPE_IPV6 0x86dd -# endif -# ifndef ETHERTYPE_VLAN -# define ETHERTYPE_VLAN 0x8100 -# endif +#ifndef ETHERTYPE_IP +# define ETHERTYPE_IP 0x0800 +#endif +#ifndef ETHERTYPE_ARP +# define ETHERTYPE_ARP 0x0806 +#endif +#ifndef ETHERTYPE_REVARP +# define ETHERTYPE_REVARP 0x8035 +#endif +#ifndef ETHERTYPE_IPV6 +# define ETHERTYPE_IPV6 0x86dd +#endif +#ifndef ETHERTYPE_VLAN +# define ETHERTYPE_VLAN 0x8100 +#endif =20 /** * Chain suffix size is: @@ -66,7 +65,7 @@ * terminating '0' =3D * 32-3-15-1-1 =3D 12 */ -# define MAX_CHAIN_SUFFIX_SIZE 12 +#define MAX_CHAIN_SUFFIX_SIZE 12 =20 =20 typedef enum { @@ -76,13 +75,13 @@ typedef enum { } virNWFilterEntryItemFlags; =20 =20 -# define MAX_COMMENT_LENGTH 256 -# define MAX_IPSET_NAME_LENGTH 32 /* incl. terminating '\0' */ +#define MAX_COMMENT_LENGTH 256 +#define MAX_IPSET_NAME_LENGTH 32 /* incl. terminating '\0' */ =20 -# define HAS_ENTRY_ITEM(data) \ +#define HAS_ENTRY_ITEM(data) \ (((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_EXISTS) =20 -# define ENTRY_WANT_NEG_SIGN(data) \ +#define ENTRY_WANT_NEG_SIGN(data) \ (((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) =20 /* datatypes appearing in rule attributes */ @@ -108,7 +107,7 @@ typedef enum attrDatatype { DATATYPE_LAST =3D (1 << 17), } virNWFilterAttrDataType; =20 -# define NWFILTER_MAC_BGA "01:80:c2:00:00:00" +#define NWFILTER_MAC_BGA "01:80:c2:00:00:00" =20 =20 typedef struct _nwItemDesc nwItemDesc; @@ -138,7 +137,7 @@ struct _nwItemDesc { } u; }; =20 -# define VALID_IPSETNAME \ +#define VALID_IPSETNAME \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.:-+ " =20 typedef struct _ethHdrDataDef ethHdrDataDef; @@ -426,20 +425,20 @@ typedef enum { } virNWFilterEbtablesTableType; =20 =20 -# define MIN_RULE_PRIORITY -1000 -# define MAX_RULE_PRIORITY 1000 +#define MIN_RULE_PRIORITY -1000 +#define MAX_RULE_PRIORITY 1000 =20 -# define NWFILTER_MIN_FILTER_PRIORITY -1000 -# define NWFILTER_MAX_FILTER_PRIORITY MAX_RULE_PRIORITY +#define NWFILTER_MIN_FILTER_PRIORITY -1000 +#define NWFILTER_MAX_FILTER_PRIORITY MAX_RULE_PRIORITY =20 -# define NWFILTER_ROOT_FILTER_PRI 0 -# define NWFILTER_STP_FILTER_PRI -810 -# define NWFILTER_MAC_FILTER_PRI -800 -# define NWFILTER_VLAN_FILTER_PRI -750 -# define NWFILTER_IPV4_FILTER_PRI -700 -# define NWFILTER_IPV6_FILTER_PRI -600 -# define NWFILTER_ARP_FILTER_PRI -500 -# define NWFILTER_RARP_FILTER_PRI -400 +#define NWFILTER_ROOT_FILTER_PRI 0 +#define NWFILTER_STP_FILTER_PRI -810 +#define NWFILTER_MAC_FILTER_PRI -800 +#define NWFILTER_VLAN_FILTER_PRI -750 +#define NWFILTER_IPV4_FILTER_PRI -700 +#define NWFILTER_IPV6_FILTER_PRI -600 +#define NWFILTER_ARP_FILTER_PRI -500 +#define NWFILTER_RARP_FILTER_PRI -400 =20 typedef enum { RULE_FLAG_NO_STATEMATCH =3D (1 << 0), @@ -451,7 +450,7 @@ typedef enum { } virNWFilterRuleFlags; =20 =20 -# define IPTABLES_STATE_FLAGS \ +#define IPTABLES_STATE_FLAGS \ (RULE_FLAG_STATE_NEW | \ RULE_FLAG_STATE_ESTABLISHED | \ RULE_FLAG_STATE_RELATED | \ @@ -525,7 +524,7 @@ typedef enum { VIR_NWFILTER_CHAINSUFFIX_LAST, } virNWFilterChainSuffixType; =20 -# define VALID_CHAINNAME \ +#define VALID_CHAINNAME \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.:-" =20 typedef int32_t virNWFilterChainPriority; @@ -615,5 +614,3 @@ VIR_ENUM_DECL(virNWFilterJumpTarget); VIR_ENUM_DECL(virNWFilterChainPolicy); VIR_ENUM_DECL(virNWFilterEbtablesTable); VIR_ENUM_DECL(virNWFilterChainSuffix); - -#endif /* LIBVIRT_NWFILTER_CONF_H */ diff --git a/src/conf/nwfilter_ipaddrmap.h b/src/conf/nwfilter_ipaddrmap.h index 13e763ae7e..ebb999a29a 100644 --- a/src/conf/nwfilter_ipaddrmap.h +++ b/src/conf/nwfilter_ipaddrmap.h @@ -20,8 +20,7 @@ * */ =20 -#ifndef LIBVIRT_NWFILTER_IPADDRMAP_H -# define LIBVIRT_NWFILTER_IPADDRMAP_H +#pragma once =20 int virNWFilterIPAddrMapInit(void); void virNWFilterIPAddrMapShutdown(void); @@ -30,5 +29,3 @@ int virNWFilterIPAddrMapAddIPAddr(const char *ifname, cha= r *addr); int virNWFilterIPAddrMapDelIPAddr(const char *ifname, const char *ipaddr); virNWFilterVarValuePtr virNWFilterIPAddrMapGetIPAddr(const char *ifname); - -#endif /* LIBVIRT_NWFILTER_IPADDRMAP_H */ diff --git a/src/conf/nwfilter_params.h b/src/conf/nwfilter_params.h index 9abeeba43a..d51f3f7f9f 100644 --- a/src/conf/nwfilter_params.h +++ b/src/conf/nwfilter_params.h @@ -19,13 +19,12 @@ * . */ =20 -#ifndef LIBVIRT_NWFILTER_PARAMS_H -# define LIBVIRT_NWFILTER_PARAMS_H +#pragma once =20 -# include "virhash.h" -# include "virbuffer.h" -# include "virmacaddr.h" -# include "virxml.h" +#include "virhash.h" +#include "virbuffer.h" +#include "virmacaddr.h" +#include "virxml.h" =20 typedef enum { NWFILTER_VALUE_TYPE_SIMPLE, @@ -74,16 +73,16 @@ int virNWFilterHashTablePutAll(virHashTablePtr src, bool virNWFilterHashTableEqual(virHashTablePtr a, virHashTablePtr b); =20 -# define VALID_VARNAME \ +#define VALID_VARNAME \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_" =20 -# define VALID_VARVALUE \ +#define VALID_VARVALUE \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.:" =20 -# define NWFILTER_VARNAME_IP "IP" -# define NWFILTER_VARNAME_MAC "MAC" -# define NWFILTER_VARNAME_CTRL_IP_LEARNING "CTRL_IP_LEARNING" -# define NWFILTER_VARNAME_DHCPSERVER "DHCPSERVER" +#define NWFILTER_VARNAME_IP "IP" +#define NWFILTER_VARNAME_MAC "MAC" +#define NWFILTER_VARNAME_CTRL_IP_LEARNING "CTRL_IP_LEARNING" +#define NWFILTER_VARNAME_DHCPSERVER "DHCPSERVER" =20 typedef enum { VIR_NWFILTER_VAR_ACCESS_ELEMENT =3D 0, @@ -106,7 +105,7 @@ struct _virNWFilterVarAccess { char *varName; }; =20 -# define VIR_NWFILTER_MAX_ITERID 1000 +#define VIR_NWFILTER_MAX_ITERID 1000 =20 void virNWFilterVarAccessFree(virNWFilterVarAccessPtr varAccess); bool virNWFilterVarAccessEqual(const virNWFilterVarAccess *a, @@ -150,6 +149,3 @@ virNWFilterVarCombIterPtr virNWFilterVarCombIterNext( virNWFilterVarCombIterPtr ci); const char *virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIterPtr ci, const virNWFilterVarAccess *= ); - - -#endif /* LIBVIRT_NWFILTER_PARAMS_H */ diff --git a/src/conf/virnwfilterbindingdef.h b/src/conf/virnwfilterbinding= def.h index 7cd2890b15..3d291fd6bf 100644 --- a/src/conf/virnwfilterbindingdef.h +++ b/src/conf/virnwfilterbindingdef.h @@ -19,13 +19,12 @@ * */ =20 -#ifndef LIBVIRT_VIRNWFILTERBINDINGDEF_H -# define LIBVIRT_VIRNWFILTERBINDINGDEF_H +#pragma once =20 -# include "internal.h" -# include "virmacaddr.h" -# include "virhash.h" -# include "virbuffer.h" +#include "internal.h" +#include "virmacaddr.h" +#include "virhash.h" +#include "virbuffer.h" =20 typedef struct _virNWFilterBindingDef virNWFilterBindingDef; typedef virNWFilterBindingDef *virNWFilterBindingDefPtr; @@ -62,5 +61,3 @@ virNWFilterBindingDefFormat(const virNWFilterBindingDef *= def); int virNWFilterBindingDefFormatBuf(virBufferPtr buf, const virNWFilterBindingDef *def); - -#endif /* LIBVIRT_VIRNWFILTERBINDINGDEF_H */ diff --git a/src/conf/virnwfilterbindingobj.h b/src/conf/virnwfilterbinding= obj.h index b26bb3c8ec..2318f042bc 100644 --- a/src/conf/virnwfilterbindingobj.h +++ b/src/conf/virnwfilterbindingobj.h @@ -19,12 +19,11 @@ * */ =20 -#ifndef LIBVIRT_VIRNWFILTERBINDINGOBJ_H -# define LIBVIRT_VIRNWFILTERBINDINGOBJ_H +#pragma once =20 -# include "internal.h" -# include "virnwfilterbindingdef.h" -# include "virobject.h" +#include "internal.h" +#include "virnwfilterbindingdef.h" +#include "virobject.h" =20 typedef struct _virNWFilterBindingObj virNWFilterBindingObj; typedef virNWFilterBindingObj *virNWFilterBindingObjPtr; @@ -69,5 +68,3 @@ virNWFilterBindingObjParseFile(const char *filename); =20 char * virNWFilterBindingObjFormat(const virNWFilterBindingObj *obj); - -#endif /* LIBVIRT_VIRNWFILTERBINDINGOBJ_H */ diff --git a/src/conf/virnwfilterbindingobjlist.h b/src/conf/virnwfilterbin= dingobjlist.h index b0fb90f667..a819b4cc8a 100644 --- a/src/conf/virnwfilterbindingobjlist.h +++ b/src/conf/virnwfilterbindingobjlist.h @@ -18,10 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_VIRNWFILTERBINDINGOBJLIST_H -# define LIBVIRT_VIRNWFILTERBINDINGOBJLIST_H +#pragma once =20 -# include "virnwfilterbindingobj.h" +#include "virnwfilterbindingobj.h" =20 typedef struct _virNWFilterBindingObjList virNWFilterBindingObjList; typedef virNWFilterBindingObjList *virNWFilterBindingObjListPtr; @@ -62,6 +61,3 @@ virNWFilterBindingObjListExport(virNWFilterBindingObjList= Ptr bindings, virConnectPtr conn, virNWFilterBindingPtr **bindinglist, virNWFilterBindingObjListACLFilter filter); - - -#endif /* LIBVIRT_VIRNWFILTERBINDINGOBJLIST_H */ diff --git a/src/conf/virnwfilterobj.h b/src/conf/virnwfilterobj.h index 2369c20313..bdf5c51fe2 100644 --- a/src/conf/virnwfilterobj.h +++ b/src/conf/virnwfilterobj.h @@ -17,13 +17,12 @@ * . */ =20 -#ifndef LIBVIRT_VIRNWFILTEROBJ_H -# define LIBVIRT_VIRNWFILTEROBJ_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "nwfilter_conf.h" -# include "virnwfilterbindingobjlist.h" +#include "nwfilter_conf.h" +#include "virnwfilterbindingobjlist.h" =20 typedef struct _virNWFilterObj virNWFilterObj; typedef virNWFilterObj *virNWFilterObjPtr; @@ -114,5 +113,3 @@ virNWFilterObjLock(virNWFilterObjPtr obj); =20 void virNWFilterObjUnlock(virNWFilterObjPtr obj); - -#endif /* LIBVIRT_VIRNWFILTEROBJ_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938977; cv=none; d=zoho.com; s=zohoarc; b=JMTTUNW+va+U+KF8bju978NdTkpoR1Cu1Ggf/mFqM2aqP8+YJkQrMR+tUJNzFU5c8KEKEZJRUPxI23kJqiXNkVQLhttg8MShDvpwIafvLdxjql02IvhT4/FILiTRIVqPmtoCO1p5csj6A+txpknu3N1chL2Th371tUX52FMzwOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938977; 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:ARC-Authentication-Results; bh=Ov7Ir/qLi/FMXDrkBQp9axGfztEBVZtNoW2QuJGxxLU=; b=WNk2sVxzDNGDQKDqzuJ12G5KSgFuQwhonYyJj6W2OGkWgvKtkLxc8uF0T3CMCdyc8BO0rZmYY6NaTJNX5jy00bY/Cnqch949ur3by8vuAt6i5MEXCg1BxGmqDrMd/TGIhjEkiPB+y0RNxEYAB8/lYTS+hsOrQ+rB9eE1RTF2aRU= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938977147919.5442192779226; Fri, 7 Jun 2019 13:22:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77AD930BC57A; Fri, 7 Jun 2019 20:22:47 +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 AD0311001B04; Fri, 7 Jun 2019 20:22:46 +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 71D091806B1B; Fri, 7 Jun 2019 20:22:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKepC025715 for ; Fri, 7 Jun 2019 16:20:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5A0B85C220; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 288675C205 for ; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:19 -0500 Message-Id: <20190607202030.29625-9-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/19] conf: node device: use #pragma once in headers 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 07 Jun 2019 20:22:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/node_device_conf.h | 31 ++++++++++++++----------------- src/conf/node_device_event.h | 11 ++++------- src/conf/node_device_util.h | 7 ++----- src/conf/virnodedeviceobj.h | 13 +++++-------- 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index 510624968f..bf7939fbb3 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -20,23 +20,22 @@ * . */ =20 -#ifndef LIBVIRT_NODE_DEVICE_CONF_H -# define LIBVIRT_NODE_DEVICE_CONF_H +#pragma once =20 -# include "internal.h" -# include "virbitmap.h" -# include "virutil.h" -# include "virscsihost.h" -# include "virpci.h" -# include "virvhba.h" -# include "device_conf.h" -# include "storage_adapter_conf.h" -# include "virenum.h" +#include "internal.h" +#include "virbitmap.h" +#include "virutil.h" +#include "virscsihost.h" +#include "virpci.h" +#include "virvhba.h" +#include "device_conf.h" +#include "storage_adapter_conf.h" +#include "virenum.h" =20 -# include +#include =20 -# define CREATE_DEVICE 1 -# define EXISTING_DEVICE 0 +#define CREATE_DEVICE 1 +#define EXISTING_DEVICE 0 =20 typedef enum { /* Keep in sync with VIR_ENUM_IMPL in node_device_conf.c */ @@ -348,7 +347,7 @@ virNodeDeviceDefFree(virNodeDeviceDefPtr def); void virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps); =20 -# define VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP \ +#define VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP \ (VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM | \ VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV | \ VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV | \ @@ -383,5 +382,3 @@ virNodeDeviceUpdateCaps(virNodeDeviceDefPtr def); int virNodeDeviceCapsListExport(virNodeDeviceDefPtr def, virNodeDevCapType **list); - -#endif /* LIBVIRT_NODE_DEVICE_CONF_H */ diff --git a/src/conf/node_device_event.h b/src/conf/node_device_event.h index b30177a901..8fe55ba6d1 100644 --- a/src/conf/node_device_event.h +++ b/src/conf/node_device_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_NODE_DEVICE_EVENT_H -# define LIBVIRT_NODE_DEVICE_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "object_event_private.h" +#include "internal.h" +#include "object_event.h" +#include "object_event_private.h" =20 int virNodeDeviceEventStateRegisterID(virConnectPtr conn, @@ -58,5 +57,3 @@ virNodeDeviceEventLifecycleNew(const char *name, =20 virObjectEventPtr virNodeDeviceEventUpdateNew(const char *name); - -#endif /* LIBVIRT_NODE_DEVICE_EVENT_H */ diff --git a/src/conf/node_device_util.h b/src/conf/node_device_util.h index e040bf62a9..933b7f6e31 100644 --- a/src/conf/node_device_util.h +++ b/src/conf/node_device_util.h @@ -16,10 +16,9 @@ * . */ =20 -#ifndef LIBVIRT_NODE_DEVICE_UTIL_H -# define LIBVIRT_NODE_DEVICE_UTIL_H +#pragma once =20 -# include "conf/storage_adapter_conf.h" +#include "conf/storage_adapter_conf.h" =20 char * virNodeDeviceGetParentName(virConnectPtr conn, @@ -31,5 +30,3 @@ virNodeDeviceCreateVport(virStorageAdapterFCHostPtr fchos= t); int virNodeDeviceDeleteVport(virConnectPtr conn, virStorageAdapterFCHostPtr fchost); - -#endif /* LIBVIRT_NODE_DEVICE_UTIL_H */ diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h index a560852c27..1abfcb9af4 100644 --- a/src/conf/virnodedeviceobj.h +++ b/src/conf/virnodedeviceobj.h @@ -17,14 +17,13 @@ * . */ =20 -#ifndef LIBVIRT_VIRNODEDEVICEOBJ_H -# define LIBVIRT_VIRNODEDEVICEOBJ_H +#pragma once =20 -# include "internal.h" -# include "virthread.h" +#include "internal.h" +#include "virthread.h" =20 -# include "node_device_conf.h" -# include "object_event.h" +#include "node_device_conf.h" +#include "object_event.h" =20 =20 typedef struct _virNodeDeviceObj virNodeDeviceObj; @@ -112,5 +111,3 @@ virNodeDeviceObjListExport(virConnectPtr conn, void virNodeDeviceObjSetSkipUpdateCaps(virNodeDeviceObjPtr obj, bool skipUpdateCaps); - -#endif /* LIBVIRT_VIRNODEDEVICEOBJ_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938940; cv=none; d=zoho.com; s=zohoarc; b=D4dcrsjK1mUPxIFX+UH6fWQuYu/BNE3AG69lQRGImc3oYQUqv+MqkVMMNgoh0xwY5aZqSCYO2lbRU8rDC7358trRdrLhTFqnBMNNNifZfStHTbJMVlC8XtAESWLEhSOIzfzRtEyTl2DASS5pnpng4Hjny3fzNAAB8leG1or1VO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938940; 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:ARC-Authentication-Results; bh=q1w7o88NIbussxfFbOWCcVRvdQ07qwBlyQh5FOYdZ0k=; b=YAKBE1KMdE5P9CUogIBag1MjRrRuUB1o3iXgO8rBMQ47i8ZqlHD487LqVMBbO+63kJWkxsB2l2OLKt461J2imn6NCawjEu3LZM60OyAtvjrepZrCPvxENQaUkrEU2Uvxlq0x8K6SRFkc9ad/19yPIw42KO9ldhjnvxHGA0eJ9Ik= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938940936783.3766998020569; Fri, 7 Jun 2019 13:22:20 -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 17AAD4E92A; Fri, 7 Jun 2019 20:22:14 +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 5BDBA5C205; Fri, 7 Jun 2019 20:22:12 +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 192701806B1A; Fri, 7 Jun 2019 20:22:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKeYx025720 for ; Fri, 7 Jun 2019 16:20:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB53E5C205; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 785535C220 for ; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:20 -0500 Message-Id: <20190607202030.29625-10-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/19] conf: storage: use #pragma once in headers 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: , 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.38]); Fri, 07 Jun 2019 20:22:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/storage_adapter_conf.h | 11 ++++----- src/conf/storage_capabilities.h | 8 ++----- src/conf/storage_conf.h | 41 +++++++++++++++------------------ src/conf/storage_event.h | 11 ++++----- src/conf/virstorageobj.h | 11 ++++----- 5 files changed, 33 insertions(+), 49 deletions(-) diff --git a/src/conf/storage_adapter_conf.h b/src/conf/storage_adapter_con= f.h index 81d73ea889..4c7da7c8d9 100644 --- a/src/conf/storage_adapter_conf.h +++ b/src/conf/storage_adapter_conf.h @@ -17,12 +17,11 @@ * . */ =20 -#ifndef LIBVIRT_STORAGE_ADAPTER_CONF_H -# define LIBVIRT_STORAGE_ADAPTER_CONF_H +#pragma once =20 -# include "virpci.h" -# include "virxml.h" -# include "virenum.h" +#include "virpci.h" +#include "virxml.h" +#include "virenum.h" =20 =20 typedef enum { @@ -81,5 +80,3 @@ virStorageAdapterValidate(virStorageAdapterPtr adapter); void virStorageAdapterFormat(virBufferPtr buf, virStorageAdapterPtr adapter); - -#endif /* LIBVIRT_STORAGE_ADAPTER_CONF_H */ diff --git a/src/conf/storage_capabilities.h b/src/conf/storage_capabilitie= s.h index daeb496909..948e5bed5b 100644 --- a/src/conf/storage_capabilities.h +++ b/src/conf/storage_capabilities.h @@ -18,10 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_STORAGE_CAPABILITIES_H -# define LIBVIRT_STORAGE_CAPABILITIES_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 typedef struct _virStoragePoolCaps virStoragePoolCaps; typedef virStoragePoolCaps *virStoragePoolCapsPtr; @@ -36,6 +35,3 @@ virStoragePoolCapsNew(virCapsPtr driverCaps); =20 char * virStoragePoolCapsFormat(virStoragePoolCapsPtr const caps); - - -#endif /* LIBVIRT_STORAGE_CAPABILITIES_H */ diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 6e4f7c689a..338e70244d 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -19,21 +19,20 @@ * . */ =20 -#ifndef LIBVIRT_STORAGE_CONF_H -# define LIBVIRT_STORAGE_CONF_H - -# include "internal.h" -# include "virstorageencryption.h" -# include "virstoragefile.h" -# include "virbitmap.h" -# include "virthread.h" -# include "device_conf.h" -# include "object_event.h" -# include "storage_adapter_conf.h" -# include "virautoclean.h" -# include "virenum.h" - -# include +#pragma once + +#include "internal.h" +#include "virstorageencryption.h" +#include "virstoragefile.h" +#include "virbitmap.h" +#include "virthread.h" +#include "device_conf.h" +#include "object_event.h" +#include "storage_adapter_conf.h" +#include "virautoclean.h" +#include "virenum.h" + +#include =20 /* Various callbacks needed to parse/create Storage Pool XML's using * a private namespace */ @@ -460,19 +459,19 @@ typedef enum { } virStoragePartedFsType; VIR_ENUM_DECL(virStoragePartedFs); =20 -# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE \ +#define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE \ (VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE | \ VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE) =20 -# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT \ +#define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT \ (VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT | \ VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT) =20 -# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART \ +#define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART \ (VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART | \ VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART) =20 -# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE \ +#define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE \ (VIR_CONNECT_LIST_STORAGE_POOLS_DIR | \ VIR_CONNECT_LIST_STORAGE_POOLS_FS | \ VIR_CONNECT_LIST_STORAGE_POOLS_NETFS | \ @@ -487,7 +486,7 @@ VIR_ENUM_DECL(virStoragePartedFs); VIR_CONNECT_LIST_STORAGE_POOLS_ZFS | \ VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE) =20 -# define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL \ +#define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL \ (VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE | \ VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT | \ VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART | \ @@ -496,5 +495,3 @@ VIR_ENUM_DECL(virStoragePartedFs); VIR_DEFINE_AUTOPTR_FUNC(virStoragePoolSource, virStoragePoolSourceFree); VIR_DEFINE_AUTOPTR_FUNC(virStoragePoolDef, virStoragePoolDefFree); VIR_DEFINE_AUTOPTR_FUNC(virStorageVolDef, virStorageVolDefFree); - -#endif /* LIBVIRT_STORAGE_CONF_H */ diff --git a/src/conf/storage_event.h b/src/conf/storage_event.h index fd6c10969c..3e67ad5ccf 100644 --- a/src/conf/storage_event.h +++ b/src/conf/storage_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_STORAGE_EVENT_H -# define LIBVIRT_STORAGE_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "object_event_private.h" +#include "internal.h" +#include "object_event.h" +#include "object_event_private.h" =20 int virStoragePoolEventStateRegisterID(virConnectPtr conn, @@ -60,5 +59,3 @@ virStoragePoolEventLifecycleNew(const char *name, virObjectEventPtr virStoragePoolEventRefreshNew(const char *name, const unsigned char *uuid); - -#endif /* LIBVIRT_STORAGE_EVENT_H */ diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h index c41d4c16ad..92d229f9b4 100644 --- a/src/conf/virstorageobj.h +++ b/src/conf/virstorageobj.h @@ -17,14 +17,13 @@ * . */ =20 -#ifndef LIBVIRT_VIRSTORAGEOBJ_H -# define LIBVIRT_VIRSTORAGEOBJ_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "storage_conf.h" +#include "storage_conf.h" =20 -# include "capabilities.h" +#include "capabilities.h" =20 typedef struct _virStoragePoolObj virStoragePoolObj; typedef virStoragePoolObj *virStoragePoolObjPtr; @@ -256,5 +255,3 @@ virStoragePoolObjListExport(virConnectPtr conn, virStoragePoolPtr **pools, virStoragePoolObjListFilter filter, unsigned int flags); - -#endif /* LIBVIRT_VIRSTORAGEOBJ_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938962; cv=none; d=zoho.com; s=zohoarc; b=OxkjfLLMSnEkB/LwT9EiCb5plFWaSx5IOvgTDXhEL2NJllrvAK0C8o37znKYMvbM0iwVIDqJhaNhCXMDQNwU5GxLxaCc8kVomb8RiO6I7xjBL/qcJ/PUmcWQt/jjerqLtDn6MkyCgnW7eDvIzTGk2JBz61mhrZExlBoRjbkxJS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938962; 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:ARC-Authentication-Results; bh=TcYucUvbrUfGQ8vPlAoXPcBHD8/4HWHfesnlUbb2CwM=; b=UbWa3lXhKv7jfZCaXquBlAjWV3k/1OIlTquljG00DqVLaGQZuYUOXG5bEDKM/qi/OtzfFC4j+uBDATO2Oa/f3QXC9pRTOvosbSlxkOdPIe/0s0peUQ2MYnPG/kdRsGiC4noThxmbMp11tIaH157TJbPmwPsyEYOOb0RHya/pwWw= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938962941505.32866163336973; Fri, 7 Jun 2019 13:22:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F0EB30F1BC9; Fri, 7 Jun 2019 20:22:31 +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 169C55D9CC; Fri, 7 Jun 2019 20:22:29 +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 CA4241806B1E; Fri, 7 Jun 2019 20:22:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKf3O025725 for ; Fri, 7 Jun 2019 16:20:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 096575C220; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAFEE5C205 for ; Fri, 7 Jun 2019 20:20:40 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:21 -0500 Message-Id: <20190607202030.29625-11-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/19] conf: misc: use #pragma once in headers 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 07 Jun 2019 20:22:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/conf/capabilities.h | 23 +++++++++----------- src/conf/cpu_conf.h | 23 +++++++++----------- src/conf/device_conf.h | 33 +++++++++++++---------------- src/conf/interface_conf.h | 23 +++++++++----------- src/conf/moment_conf.h | 11 ++++------ src/conf/numa_conf.h | 18 ++++++---------- src/conf/object_event.h | 11 ++++------ src/conf/object_event_private.h | 7 ++---- src/conf/secret_conf.h | 15 ++++++------- src/conf/secret_event.h | 11 ++++------ src/conf/snapshot_conf.h | 13 +++++------- src/conf/virchrdev.h | 9 +++----- src/conf/virconftypes.h | 5 +---- src/conf/virdomainmomentobjlist.h | 17 ++++++--------- src/conf/virdomainobjlist.h | 21 ++++++++---------- src/conf/virdomainsnapshotobjlist.h | 21 ++++++++---------- src/conf/virinterfaceobj.h | 7 ++---- src/conf/virsavecookie.h | 13 +++++------- src/conf/virsecretobj.h | 11 ++++------ 19 files changed, 117 insertions(+), 175 deletions(-) diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index a6331b081c..28b398891a 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -19,19 +19,18 @@ * . */ =20 -#ifndef LIBVIRT_CAPABILITIES_H -# define LIBVIRT_CAPABILITIES_H +#pragma once =20 -# include "internal.h" -# include "virconftypes.h" -# include "virbuffer.h" -# include "cpu_conf.h" -# include "virarch.h" -# include "virmacaddr.h" -# include "virobject.h" -# include "virresctrl.h" +#include "internal.h" +#include "virconftypes.h" +#include "virbuffer.h" +#include "cpu_conf.h" +#include "virarch.h" +#include "virmacaddr.h" +#include "virobject.h" +#include "virresctrl.h" =20 -# include +#include =20 struct _virCapsGuestFeature { char *name; @@ -328,5 +327,3 @@ void virCapsHostCacheBankFree(virCapsHostCacheBankPtr p= tr); int virCapabilitiesInitCaches(virCapsPtr caps); =20 void virCapabilitiesHostInitIOMMU(virCapsPtr caps); - -#endif /* LIBVIRT_CAPABILITIES_H */ diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index 51bf744fab..562e0de531 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -18,19 +18,18 @@ * . */ =20 -#ifndef LIBVIRT_CPU_CONF_H -# define LIBVIRT_CPU_CONF_H +#pragma once =20 -# include "virutil.h" -# include "virbuffer.h" -# include "virxml.h" -# include "virbitmap.h" -# include "virarch.h" -# include "numa_conf.h" -# include "virenum.h" -# include "virhostcpu.h" +#include "virutil.h" +#include "virbuffer.h" +#include "virxml.h" +#include "virbitmap.h" +#include "virarch.h" +#include "numa_conf.h" +#include "virenum.h" +#include "virhostcpu.h" =20 -# define VIR_CPU_VENDOR_ID_LENGTH 12 +#define VIR_CPU_VENDOR_ID_LENGTH 12 =20 typedef enum { VIR_CPU_TYPE_HOST, @@ -226,5 +225,3 @@ virCPUDefListParse(const char **xmlCPUs, virCPUType cpuType); void virCPUDefListFree(virCPUDefPtr *cpus); - -#endif /* LIBVIRT_CPU_CONF_H */ diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index b3299ac69d..06f7f365ad 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -18,20 +18,19 @@ * . */ =20 -#ifndef LIBVIRT_DEVICE_CONF_H -# define LIBVIRT_DEVICE_CONF_H +#pragma once =20 -# include -# include -# include +#include +#include +#include =20 -# include "internal.h" -# include "virutil.h" -# include "virthread.h" -# include "virbuffer.h" -# include "virpci.h" -# include "virnetdev.h" -# include "virenum.h" +#include "internal.h" +#include "virutil.h" +#include "virthread.h" +#include "virbuffer.h" +#include "virpci.h" +#include "virnetdev.h" +#include "virenum.h" =20 typedef enum { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE, @@ -69,9 +68,9 @@ struct _virDomainDeviceVirtioSerialAddress { unsigned int port; }; =20 -# define VIR_DOMAIN_DEVICE_CCW_MAX_CSSID 254 -# define VIR_DOMAIN_DEVICE_CCW_MAX_SSID 3 -# define VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO 65535 +#define VIR_DOMAIN_DEVICE_CCW_MAX_CSSID 254 +#define VIR_DOMAIN_DEVICE_CCW_MAX_SSID 3 +#define VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO 65535 =20 typedef struct _virDomainDeviceCCWAddress virDomainDeviceCCWAddress; typedef virDomainDeviceCCWAddress *virDomainDeviceCCWAddressPtr; @@ -89,7 +88,7 @@ struct _virDomainDeviceCcidAddress { unsigned int slot; }; =20 -# define VIR_DOMAIN_DEVICE_USB_MAX_PORT_DEPTH 4 +#define VIR_DOMAIN_DEVICE_USB_MAX_PORT_DEPTH 4 =20 typedef struct _virDomainDeviceUSBAddress virDomainDeviceUSBAddress; typedef virDomainDeviceUSBAddress *virDomainDeviceUSBAddressPtr; @@ -231,5 +230,3 @@ int virInterfaceLinkParseXML(xmlNodePtr node, =20 int virInterfaceLinkFormat(virBufferPtr buf, const virNetDevIfLink *lnk); - -#endif /* LIBVIRT_DEVICE_CONF_H */ diff --git a/src/conf/interface_conf.h b/src/conf/interface_conf.h index e56b158b6d..ce405e5b15 100644 --- a/src/conf/interface_conf.h +++ b/src/conf/interface_conf.h @@ -18,18 +18,17 @@ * . */ =20 -#ifndef LIBVIRT_INTERFACE_CONF_H -# define LIBVIRT_INTERFACE_CONF_H +#pragma once =20 -# include -# include -# include +#include +#include +#include =20 -# include "internal.h" -# include "virutil.h" -# include "virthread.h" -# include "device_conf.h" -# include "virenum.h" +#include "internal.h" +#include "virutil.h" +#include "virthread.h" +#include "device_conf.h" +#include "virenum.h" =20 /* There is currently 3 types of interfaces */ =20 @@ -175,8 +174,6 @@ virInterfaceDefParseNode(xmlDocPtr xml, char * virInterfaceDefFormat(const virInterfaceDef *def); =20 -# define VIR_CONNECT_LIST_INTERFACES_FILTERS_ACTIVE \ +#define VIR_CONNECT_LIST_INTERFACES_FILTERS_ACTIVE \ (VIR_CONNECT_LIST_INTERFACES_ACTIVE | \ VIR_CONNECT_LIST_INTERFACES_INACTIVE) - -#endif /* LIBVIRT_INTERFACE_CONF_H */ diff --git a/src/conf/moment_conf.h b/src/conf/moment_conf.h index 00ec1c1904..9fdbef2172 100644 --- a/src/conf/moment_conf.h +++ b/src/conf/moment_conf.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_MOMENT_CONF_H -# define LIBVIRT_MOMENT_CONF_H +#pragma once =20 -# include "internal.h" -# include "virconftypes.h" -# include "virobject.h" +#include "internal.h" +#include "virconftypes.h" +#include "virobject.h" =20 /* Base class for a domain moment */ struct _virDomainMomentDef { @@ -43,5 +42,3 @@ struct _virDomainMomentDef { virClassPtr virClassForDomainMomentDef(void); =20 int virDomainMomentDefPostParse(virDomainMomentDefPtr def); - -#endif /* LIBVIRT_MOMENT_CONF_H */ diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h index ae1793a950..e76a09c20c 100644 --- a/src/conf/numa_conf.h +++ b/src/conf/numa_conf.h @@ -18,16 +18,15 @@ * . */ =20 -#ifndef LIBVIRT_NUMA_CONF_H -# define LIBVIRT_NUMA_CONF_H +#pragma once =20 -# include +#include =20 -# include "internal.h" -# include "virutil.h" -# include "virbitmap.h" -# include "virbuffer.h" -# include "virenum.h" +#include "internal.h" +#include "virutil.h" +#include "virbitmap.h" +#include "virbuffer.h" +#include "virenum.h" =20 =20 typedef struct _virDomainNuma virDomainNuma; @@ -185,6 +184,3 @@ int virDomainNumaDefCPUParseXML(virDomainNumaPtr def, x= mlXPathContextPtr ctxt); int virDomainNumaDefCPUFormatXML(virBufferPtr buf, virDomainNumaPtr def); =20 unsigned int virDomainNumaGetCPUCountTotal(virDomainNumaPtr numa); - - -#endif /* LIBVIRT_NUMA_CONF_H */ diff --git a/src/conf/object_event.h b/src/conf/object_event.h index bbeaa3aae7..63b0818613 100644 --- a/src/conf/object_event.h +++ b/src/conf/object_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_OBJECT_EVENT_H -# define LIBVIRT_OBJECT_EVENT_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "virobject.h" +#include "virobject.h" =20 /** * Dispatching domain events that come in while @@ -54,7 +53,7 @@ typedef void (*virConnectObjectEventGenericCallback)(virC= onnectPtr conn, void *obj, void *opaque); =20 -# define VIR_OBJECT_EVENT_CALLBACK(cb) \ +#define VIR_OBJECT_EVENT_CALLBACK(cb) \ ((virConnectObjectEventGenericCallback)(cb)) =20 void @@ -88,5 +87,3 @@ virObjectEventStateSetRemote(virConnectPtr conn, int callbackID, int remoteID) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - -#endif /* LIBVIRT_OBJECT_EVENT_H */ diff --git a/src/conf/object_event_private.h b/src/conf/object_event_privat= e.h index 5000b99504..b31441c53a 100644 --- a/src/conf/object_event_private.h +++ b/src/conf/object_event_private.h @@ -20,10 +20,9 @@ * . */ =20 -#ifndef LIBVIRT_OBJECT_EVENT_PRIVATE_H -# define LIBVIRT_OBJECT_EVENT_PRIVATE_H +#pragma once =20 -# include "datatypes.h" +#include "datatypes.h" =20 struct _virObjectMeta { int id; @@ -105,5 +104,3 @@ virObjectEventNew(virClassPtr klass, const char *key) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(7); - -#endif /* LIBVIRT_OBJECT_EVENT_PRIVATE_H */ diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h index 1a48f12dd9..de1c28e187 100644 --- a/src/conf/secret_conf.h +++ b/src/conf/secret_conf.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_SECRET_CONF_H -# define LIBVIRT_SECRET_CONF_H +#pragma once =20 -# include "internal.h" -# include "virutil.h" +#include "internal.h" +#include "virutil.h" =20 typedef struct _virSecretDef virSecretDef; typedef virSecretDef *virSecretDefPtr; @@ -40,16 +39,14 @@ virSecretDefPtr virSecretDefParseString(const char *xml= ); virSecretDefPtr virSecretDefParseFile(const char *filename); char *virSecretDefFormat(const virSecretDef *def); =20 -# define VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL \ +#define VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL \ (VIR_CONNECT_LIST_SECRETS_EPHEMERAL | \ VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL) =20 -# define VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE \ +#define VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE \ (VIR_CONNECT_LIST_SECRETS_PRIVATE | \ VIR_CONNECT_LIST_SECRETS_NO_PRIVATE) =20 -# define VIR_CONNECT_LIST_SECRETS_FILTERS_ALL \ +#define VIR_CONNECT_LIST_SECRETS_FILTERS_ALL \ (VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL | \ VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE) - -#endif /* LIBVIRT_SECRET_CONF_H */ diff --git a/src/conf/secret_event.h b/src/conf/secret_event.h index 83a432d5a6..3fe80521b9 100644 --- a/src/conf/secret_event.h +++ b/src/conf/secret_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_SECRET_EVENT_H -# define LIBVIRT_SECRET_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "object_event_private.h" +#include "internal.h" +#include "object_event.h" +#include "object_event_private.h" =20 int virSecretEventStateRegisterID(virConnectPtr conn, @@ -61,5 +60,3 @@ virObjectEventPtr virSecretEventValueChangedNew(const unsigned char *uuid, int usage_type, const char *usage_id); - -#endif /* LIBVIRT_SECRET_EVENT_H */ diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index 55b7487cfb..08b2a3b955 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -19,13 +19,12 @@ * . */ =20 -#ifndef LIBVIRT_SNAPSHOT_CONF_H -# define LIBVIRT_SNAPSHOT_CONF_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" -# include "moment_conf.h" -# include "virenum.h" +#include "internal.h" +#include "domain_conf.h" +#include "moment_conf.h" +#include "virenum.h" =20 /* Items related to snapshot state */ =20 @@ -143,5 +142,3 @@ int virDomainSnapshotRedefineValidate(virDomainSnapshot= DefPtr def, =20 VIR_ENUM_DECL(virDomainSnapshotLocation); VIR_ENUM_DECL(virDomainSnapshotState); - -#endif /* LIBVIRT_SNAPSHOT_CONF_H */ diff --git a/src/conf/virchrdev.h b/src/conf/virchrdev.h index 42306ff933..e218ea7203 100644 --- a/src/conf/virchrdev.h +++ b/src/conf/virchrdev.h @@ -19,11 +19,10 @@ * . */ =20 -#ifndef LIBVIRT_VIRCHRDEV_H -# define LIBVIRT_VIRCHRDEV_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" +#include "internal.h" +#include "domain_conf.h" =20 typedef struct _virChrdevs virChrdevs; typedef virChrdevs *virChrdevsPtr; @@ -33,5 +32,3 @@ void virChrdevFree(virChrdevsPtr devs); =20 int virChrdevOpen(virChrdevsPtr devs, virDomainChrSourceDefPtr source, virStreamPtr st, bool force); - -#endif /* LIBVIRT_VIRCHRDEV_H */ diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 6a8267c422..b8f553f7fb 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -20,8 +20,7 @@ * . */ =20 -#ifndef LIBVIRT_VIRCONFTYPES_H -# define LIBVIRT_VIRCONFTYPES_H +#pragma once =20 /* forward declarations of various types required in src/conf */ =20 @@ -345,5 +344,3 @@ typedef virDomainXMLPrivateDataCallbacks *virDomainXMLP= rivateDataCallbacksPtr; =20 typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpt= s; typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; - -#endif /* LIBVIRT_VIRCONFTYPES_H */ diff --git a/src/conf/virdomainmomentobjlist.h b/src/conf/virdomainmomentob= jlist.h index 6481c771de..68f00a114f 100644 --- a/src/conf/virdomainmomentobjlist.h +++ b/src/conf/virdomainmomentobjlist.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_VIRDOMAINMOMENTOBJLIST_H -# define LIBVIRT_VIRDOMAINMOMENTOBJLIST_H +#pragma once =20 -# include "internal.h" -# include "virconftypes.h" -# include "virhash.h" +#include "internal.h" +#include "virconftypes.h" +#include "virhash.h" =20 /* Filter that returns true if a given moment matches the filter flags */ typedef bool (*virDomainMomentObjListFilter)(virDomainMomentObjPtr obj, @@ -83,15 +82,15 @@ typedef enum { VIR_DOMAIN_MOMENT_LIST_NO_METADATA =3D (1 << 5), } virDomainMomentFilters; =20 -# define VIR_DOMAIN_MOMENT_FILTERS_METADATA \ +#define VIR_DOMAIN_MOMENT_FILTERS_METADATA \ (VIR_DOMAIN_MOMENT_LIST_METADATA | \ VIR_DOMAIN_MOMENT_LIST_NO_METADATA) =20 -# define VIR_DOMAIN_MOMENT_FILTERS_LEAVES \ +#define VIR_DOMAIN_MOMENT_FILTERS_LEAVES \ (VIR_DOMAIN_MOMENT_LIST_LEAVES | \ VIR_DOMAIN_MOMENT_LIST_NO_LEAVES) =20 -# define VIR_DOMAIN_MOMENT_FILTERS_ALL \ +#define VIR_DOMAIN_MOMENT_FILTERS_ALL \ (VIR_DOMAIN_MOMENT_LIST_ROOTS | \ VIR_DOMAIN_MOMENT_LIST_TOPOLOGICAL | \ VIR_DOMAIN_MOMENT_FILTERS_METADATA | \ @@ -118,5 +117,3 @@ int virDomainMomentForEach(virDomainMomentObjListPtr mo= ments, virHashIterator iter, void *data); int virDomainMomentUpdateRelations(virDomainMomentObjListPtr moments); - -#endif /* LIBVIRT_VIRDOMAINMOMENTOBJLIST_H */ diff --git a/src/conf/virdomainobjlist.h b/src/conf/virdomainobjlist.h index c1ffee76ad..bf3ab396fa 100644 --- a/src/conf/virdomainobjlist.h +++ b/src/conf/virdomainobjlist.h @@ -20,10 +20,9 @@ * . */ =20 -#ifndef LIBVIRT_VIRDOMAINOBJLIST_H -# define LIBVIRT_VIRDOMAINOBJLIST_H +#pragma once =20 -# include "domain_conf.h" +#include "domain_conf.h" =20 typedef struct _virDomainObjList virDomainObjList; typedef virDomainObjList *virDomainObjListPtr; @@ -95,33 +94,33 @@ int virDomainObjListForEach(virDomainObjListPtr doms, virDomainObjListIterator callback, void *opaque); =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE \ (VIR_CONNECT_LIST_DOMAINS_ACTIVE | \ VIR_CONNECT_LIST_DOMAINS_INACTIVE) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_PERSISTENT \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_PERSISTENT \ (VIR_CONNECT_LIST_DOMAINS_PERSISTENT | \ VIR_CONNECT_LIST_DOMAINS_TRANSIENT) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_STATE \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_STATE \ (VIR_CONNECT_LIST_DOMAINS_RUNNING | \ VIR_CONNECT_LIST_DOMAINS_PAUSED | \ VIR_CONNECT_LIST_DOMAINS_SHUTOFF | \ VIR_CONNECT_LIST_DOMAINS_OTHER) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_MANAGEDSAVE \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_MANAGEDSAVE \ (VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE | \ VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_AUTOSTART \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_AUTOSTART \ (VIR_CONNECT_LIST_DOMAINS_AUTOSTART | \ VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_SNAPSHOT \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_SNAPSHOT \ (VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT | \ VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT) =20 -# define VIR_CONNECT_LIST_DOMAINS_FILTERS_ALL \ +#define VIR_CONNECT_LIST_DOMAINS_FILTERS_ALL \ (VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE | \ VIR_CONNECT_LIST_DOMAINS_FILTERS_PERSISTENT | \ VIR_CONNECT_LIST_DOMAINS_FILTERS_STATE | \ @@ -149,5 +148,3 @@ int virDomainObjListConvert(virDomainObjListPtr domlist, virDomainObjListACLFilter filter, unsigned int flags, bool skip_missing); - -#endif /* LIBVIRT_VIRDOMAINOBJLIST_H */ diff --git a/src/conf/virdomainsnapshotobjlist.h b/src/conf/virdomainsnapsh= otobjlist.h index b83f7a4ba9..26fa456730 100644 --- a/src/conf/virdomainsnapshotobjlist.h +++ b/src/conf/virdomainsnapshotobjlist.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H -# define LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H +#pragma once =20 -# include "internal.h" -# include "virdomainmomentobjlist.h" -# include "virbuffer.h" +#include "internal.h" +#include "virdomainmomentobjlist.h" +#include "virbuffer.h" =20 virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void); void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots); @@ -54,24 +53,24 @@ int virDomainSnapshotForEach(virDomainSnapshotObjListPt= r snapshots, void *data); int virDomainSnapshotUpdateRelations(virDomainSnapshotObjListPtr snapshots= ); =20 -# define VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA \ +#define VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA \ (VIR_DOMAIN_SNAPSHOT_LIST_METADATA | \ VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA) =20 -# define VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES \ +#define VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES \ (VIR_DOMAIN_SNAPSHOT_LIST_LEAVES | \ VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES) =20 -# define VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS \ +#define VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS \ (VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE | \ VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE | \ VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) =20 -# define VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION \ +#define VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION \ (VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL | \ VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL) =20 -# define VIR_DOMAIN_SNAPSHOT_FILTERS_ALL \ +#define VIR_DOMAIN_SNAPSHOT_FILTERS_ALL \ (VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA | \ VIR_DOMAIN_SNAPSHOT_FILTERS_LEAVES | \ VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS | \ @@ -89,5 +88,3 @@ virDomainSnapshotObjGetDef(virDomainMomentObjPtr obj) { return (virDomainSnapshotDefPtr) obj->def; } - -#endif /* LIBVIRT_VIRDOMAINSNAPSHOTOBJLIST_H */ diff --git a/src/conf/virinterfaceobj.h b/src/conf/virinterfaceobj.h index 6ad331af4f..6142fb9f53 100644 --- a/src/conf/virinterfaceobj.h +++ b/src/conf/virinterfaceobj.h @@ -17,10 +17,9 @@ * . */ =20 -#ifndef LIBVIRT_VIRINTERFACEOBJ_H -# define LIBVIRT_VIRINTERFACEOBJ_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 typedef struct _virInterfaceObj virInterfaceObj; typedef virInterfaceObj *virInterfaceObjPtr; @@ -88,5 +87,3 @@ virInterfaceObjListExport(virConnectPtr conn, virInterfacePtr **ifaces, virInterfaceObjListFilter filter, unsigned int flags); - -#endif /* LIBVIRT_VIRINTERFACEOBJ_H */ diff --git a/src/conf/virsavecookie.h b/src/conf/virsavecookie.h index a5e41e7acb..eafffbed66 100644 --- a/src/conf/virsavecookie.h +++ b/src/conf/virsavecookie.h @@ -18,14 +18,13 @@ * . */ =20 -#ifndef LIBVIRT_VIRSAVECOOKIE_H -# define LIBVIRT_VIRSAVECOOKIE_H +#pragma once =20 -# include +#include =20 -# include "internal.h" -# include "virobject.h" -# include "virbuffer.h" +#include "internal.h" +#include "virobject.h" +#include "virbuffer.h" =20 =20 typedef int (*virSaveCookieParseFunc)(xmlXPathContextPtr ctxt, @@ -59,5 +58,3 @@ virSaveCookieFormatBuf(virBufferPtr buf, char * virSaveCookieFormat(virObjectPtr obj, virSaveCookieCallbacksPtr saveCookie); - -#endif /* LIBVIRT_VIRSAVECOOKIE_H */ diff --git a/src/conf/virsecretobj.h b/src/conf/virsecretobj.h index 1563fa8ca7..09ee19f603 100644 --- a/src/conf/virsecretobj.h +++ b/src/conf/virsecretobj.h @@ -18,13 +18,12 @@ * . */ =20 -#ifndef LIBVIRT_VIRSECRETOBJ_H -# define LIBVIRT_VIRSECRETOBJ_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "secret_conf.h" -# include "virobject.h" +#include "secret_conf.h" +#include "virobject.h" =20 typedef struct _virSecretObj virSecretObj; typedef virSecretObj *virSecretObjPtr; @@ -117,5 +116,3 @@ virSecretObjSetValueSize(virSecretObjPtr obj, int virSecretLoadAllConfigs(virSecretObjListPtr secrets, const char *configDir); - -#endif /* LIBVIRT_VIRSECRETOBJ_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938967; cv=none; d=zoho.com; s=zohoarc; b=glS6shIufIQUxpLkVy+y51y/W2bDPnu7NoBB2gtt5ZDixWeZD5dgQ/cMqQQjEbv7z8BIIbgZcm1aD83N6i5MaM9/SguhwzNn6Ixq6RS8e4nIrtnQsH6K38pr6p1KgiUbk5QtzkyLe6BAoWs59CGQj3+J0+nMfgXdHft7a8JCzmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938967; 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:ARC-Authentication-Results; bh=vDX6h71o9A9pzhvOcryEv8XztdMOJDLS16MHWX0StF4=; b=JfN3uYjaL8C473AZvTNFSCgtIemEnRXQYdN64J/932bTXWkv+OfZxk9TrGEunorbN2lYM1xJryAximiyF/lVZ5Cjyy9XwJIZInBCp0IApXQdVsIG9XQp1URoch4+d8aj2dv7TVgxOjXqJs9zzDvTUsAIiYuBIhk8l10EWFzaKx4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155993896796316.94857234268477; Fri, 7 Jun 2019 13:22:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E86130C31B5; Fri, 7 Jun 2019 20:22:42 +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 EEFF85D9CC; Fri, 7 Jun 2019 20:22: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 A0739206D7; Fri, 7 Jun 2019 20:22:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKfAT025733 for ; Fri, 7 Jun 2019 16:20:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 598AB5C220; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 289CD5C205 for ; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:22 -0500 Message-Id: <20190607202030.29625-12-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/19] src/cpu: use #pragma once in headers 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Jun 2019 20:22:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu.h | 19 ++++++------- src/cpu/cpu_arm.h | 7 ++--- src/cpu/cpu_map.h | 7 ++--- src/cpu/cpu_ppc64.h | 7 ++--- src/cpu/cpu_ppc64_data.h | 8 ++---- src/cpu/cpu_s390.h | 7 ++--- src/cpu/cpu_x86.h | 9 +++---- src/cpu/cpu_x86_data.h | 58 +++++++++++++++++++--------------------- 8 files changed, 48 insertions(+), 74 deletions(-) diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 3446627e18..7cc9e7d9db 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -18,16 +18,15 @@ * . */ =20 -#ifndef LIBVIRT_CPU_H -# define LIBVIRT_CPU_H +#pragma once =20 -# include "virerror.h" -# include "datatypes.h" -# include "virarch.h" -# include "domain_capabilities.h" -# include "cpu_conf.h" -# include "cpu_x86_data.h" -# include "cpu_ppc64_data.h" +#include "virerror.h" +#include "datatypes.h" +#include "virarch.h" +#include "domain_capabilities.h" +#include "cpu_conf.h" +#include "cpu_x86_data.h" +#include "cpu_ppc64_data.h" =20 =20 typedef struct _virCPUData virCPUData; @@ -264,5 +263,3 @@ char *virCPUDataFormat(const virCPUData *data) ATTRIBUTE_NONNULL(1); virCPUDataPtr virCPUDataParse(const char *xmlStr) ATTRIBUTE_NONNULL(1); - -#endif /* LIBVIRT_CPU_H */ diff --git a/src/cpu/cpu_arm.h b/src/cpu/cpu_arm.h index c1a8939a61..a182a832c7 100644 --- a/src/cpu/cpu_arm.h +++ b/src/cpu/cpu_arm.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_ARM_H -# define LIBVIRT_CPU_ARM_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverArm; - -#endif /* LIBVIRT_CPU_ARM_H */ diff --git a/src/cpu/cpu_map.h b/src/cpu/cpu_map.h index a7a7509b7e..2d95cdb8e8 100644 --- a/src/cpu/cpu_map.h +++ b/src/cpu/cpu_map.h @@ -18,10 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_CPU_MAP_H -# define LIBVIRT_CPU_MAP_H +#pragma once =20 -# include "virxml.h" +#include "virxml.h" =20 typedef int (*cpuMapLoadCallback) (xmlXPathContextPtr ctxt, @@ -34,5 +33,3 @@ cpuMapLoad(const char *arch, cpuMapLoadCallback featureCB, cpuMapLoadCallback modelCB, void *data); - -#endif /* LIBVIRT_CPU_MAP_H */ diff --git a/src/cpu/cpu_ppc64.h b/src/cpu/cpu_ppc64.h index 18b8376bb7..fade97ba93 100644 --- a/src/cpu/cpu_ppc64.h +++ b/src/cpu/cpu_ppc64.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_PPC64_H -# define LIBVIRT_CPU_PPC64_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverPPC64; - -#endif /* LIBVIRT_CPU_PPC64_H */ diff --git a/src/cpu/cpu_ppc64_data.h b/src/cpu/cpu_ppc64_data.h index 2018cbbb6f..59aa13562f 100644 --- a/src/cpu/cpu_ppc64_data.h +++ b/src/cpu/cpu_ppc64_data.h @@ -18,9 +18,7 @@ * . */ =20 -#ifndef LIBVIRT_CPU_PPC64_DATA_H -# define LIBVIRT_CPU_PPC64_DATA_H - +#pragma once =20 typedef struct _virCPUppc64PVR virCPUppc64PVR; struct _virCPUppc64PVR { @@ -28,12 +26,10 @@ struct _virCPUppc64PVR { uint32_t mask; }; =20 -# define VIR_CPU_PPC64_DATA_INIT { 0 } +#define VIR_CPU_PPC64_DATA_INIT { 0 } =20 typedef struct _virCPUppc64Data virCPUppc64Data; struct _virCPUppc64Data { size_t len; virCPUppc64PVR *pvr; }; - -#endif /* LIBVIRT_CPU_PPC64_DATA_H */ diff --git a/src/cpu/cpu_s390.h b/src/cpu/cpu_s390.h index 4c45e1b32c..2a3bafa5b8 100644 --- a/src/cpu/cpu_s390.h +++ b/src/cpu/cpu_s390.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_S390_H -# define LIBVIRT_CPU_S390_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverS390; - -#endif /* LIBVIRT_CPU_S390_H */ diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index cd44cbe4f3..29037d4afa 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_CPU_X86_H -# define LIBVIRT_CPU_X86_H +#pragma once =20 -# include "cpu.h" -# include "cpu_x86_data.h" +#include "cpu.h" +#include "cpu_x86_data.h" =20 extern struct cpuArchDriver cpuDriverX86; =20 @@ -44,5 +43,3 @@ int virCPUx86DataSetVendor(virCPUDataPtr cpuData, =20 int virCPUx86DataAddFeature(virCPUDataPtr cpuData, const char *name); - -#endif /* LIBVIRT_CPU_X86_H */ diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index 4600870c4c..f3f4d7ab9c 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -18,9 +18,7 @@ * . */ =20 -#ifndef LIBVIRT_CPU_X86_DATA_H -# define LIBVIRT_CPU_X86_DATA_H - +#pragma once =20 typedef struct _virCPUx86CPUID virCPUx86CPUID; typedef virCPUx86CPUID *virCPUx86CPUIDPtr; @@ -41,41 +39,41 @@ struct _virCPUx86MSR { uint32_t edx; }; =20 -# define CPUX86_BASIC 0x0 -# define CPUX86_KVM 0x40000000 -# define CPUX86_EXTENDED 0x80000000 +#define CPUX86_BASIC 0x0 +#define CPUX86_KVM 0x40000000 +#define CPUX86_EXTENDED 0x80000000 =20 -# define VIR_CPU_x86_KVM_CLOCKSOURCE "__kvm_clocksource" -# define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay" -# define VIR_CPU_x86_KVM_MMU_OP "__kvm_mmu_op" -# define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2" -# define VIR_CPU_x86_KVM_ASYNC_PF "__kvm_async_pf" -# define VIR_CPU_x86_KVM_STEAL_TIME "__kvm_steal_time" -# define VIR_CPU_x86_KVM_PV_EOI "__kvm_pv_eoi" -# define VIR_CPU_x86_KVM_PV_UNHALT "__kvm_pv_unhalt" -# define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable" +#define VIR_CPU_x86_KVM_CLOCKSOURCE "__kvm_clocksource" +#define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay" +#define VIR_CPU_x86_KVM_MMU_OP "__kvm_mmu_op" +#define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2" +#define VIR_CPU_x86_KVM_ASYNC_PF "__kvm_async_pf" +#define VIR_CPU_x86_KVM_STEAL_TIME "__kvm_steal_time" +#define VIR_CPU_x86_KVM_PV_EOI "__kvm_pv_eoi" +#define VIR_CPU_x86_KVM_PV_UNHALT "__kvm_pv_unhalt" +#define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable" =20 /* * The following HyperV feature names suffixes must exactly match correspo= nding * ones defined for virDomainHyperv in domain_conf.c. * E.g "__kvm_runtime" -> "runtime", "__kvm_hv_spinlocks" -> "spinlocks" e= tc. */ -# define VIR_CPU_x86_KVM_HV_RUNTIME "__kvm_hv_runtime" -# define VIR_CPU_x86_KVM_HV_SYNIC "__kvm_hv_synic" -# define VIR_CPU_x86_KVM_HV_STIMER "__kvm_hv_stimer" -# define VIR_CPU_x86_KVM_HV_RELAXED "__kvm_hv_relaxed" -# define VIR_CPU_x86_KVM_HV_SPINLOCKS "__kvm_hv_spinlocks" -# define VIR_CPU_x86_KVM_HV_VAPIC "__kvm_hv_vapic" -# define VIR_CPU_x86_KVM_HV_VPINDEX "__kvm_hv_vpindex" -# define VIR_CPU_x86_KVM_HV_RESET "__kvm_hv_reset" -# define VIR_CPU_x86_KVM_HV_FREQUENCIES "__kvm_hv_frequencies" -# define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "__kvm_hv_reenlightenment" -# define VIR_CPU_x86_KVM_HV_TLBFLUSH "__kvm_hv_tlbflush" -# define VIR_CPU_x86_KVM_HV_IPI "__kvm_hv_ipi" -# define VIR_CPU_x86_KVM_HV_EVMCS "__kvm_hv_evmcs" +#define VIR_CPU_x86_KVM_HV_RUNTIME "__kvm_hv_runtime" +#define VIR_CPU_x86_KVM_HV_SYNIC "__kvm_hv_synic" +#define VIR_CPU_x86_KVM_HV_STIMER "__kvm_hv_stimer" +#define VIR_CPU_x86_KVM_HV_RELAXED "__kvm_hv_relaxed" +#define VIR_CPU_x86_KVM_HV_SPINLOCKS "__kvm_hv_spinlocks" +#define VIR_CPU_x86_KVM_HV_VAPIC "__kvm_hv_vapic" +#define VIR_CPU_x86_KVM_HV_VPINDEX "__kvm_hv_vpindex" +#define VIR_CPU_x86_KVM_HV_RESET "__kvm_hv_reset" +#define VIR_CPU_x86_KVM_HV_FREQUENCIES "__kvm_hv_frequencies" +#define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "__kvm_hv_reenlightenment" +#define VIR_CPU_x86_KVM_HV_TLBFLUSH "__kvm_hv_tlbflush" +#define VIR_CPU_x86_KVM_HV_IPI "__kvm_hv_ipi" +#define VIR_CPU_x86_KVM_HV_EVMCS "__kvm_hv_evmcs" =20 =20 -# define VIR_CPU_X86_DATA_INIT { 0 } +#define VIR_CPU_X86_DATA_INIT { 0 } =20 typedef enum { VIR_CPU_X86_DATA_NONE =3D 0, @@ -98,5 +96,3 @@ struct _virCPUx86Data { size_t len; virCPUx86DataItem *items; }; - -#endif /* LIBVIRT_CPU_X86_DATA_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938976; cv=none; d=zoho.com; s=zohoarc; b=dMjghJwBX9rXoVnYDAY+a7YtDDMMY3HzLsBcsUEONVuNKzKp2RbDZtM8SfBYjOTEvrAhFNPb+wiYNLrPBkvix8kS6jzsdoLXPYPGyntn0oqaeRWVVTOD5M13y9KtPpM/Vd5P1GuRsrALWW0baGzznjzzZ/MTjLC2Bhl9XBvEIqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938976; 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:ARC-Authentication-Results; bh=mLeQMv2/pg3aRG8FyVSJ29lTp/xZpjeN2g37CzJweKE=; b=ZFXtijYzUtlpuoVSL7LOuOwNYn9xs/oTU/NwTCdp95Mi2/T5rrnCbDIeKA+f657YZpWCgzEVDtbwYSWXyfi+ouJvxoQPBU4wUHA+vlvKfqXD2zY5Es/16soAn9ZZy3Mn/o72tc8rRNgYh4idJmC8oVM8B++2Y+fr6y4MBH/BkOs= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938976712579.4747749993638; Fri, 7 Jun 2019 13:22:56 -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 1013630F1BB3; Fri, 7 Jun 2019 20:22:55 +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 DD1045C22D; Fri, 7 Jun 2019 20:22:52 +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 A56F8206D9; Fri, 7 Jun 2019 20:22:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKfPr025743 for ; Fri, 7 Jun 2019 16:20:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC5E75C220; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A0085C205 for ; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:23 -0500 Message-Id: <20190607202030.29625-13-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 12/19] src/datatypes.h: use #pragma once 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: , 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.43]); Fri, 07 Jun 2019 20:22:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/datatypes.h | 89 ++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index 87f3d5e095..36d4cb9314 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -19,15 +19,14 @@ * */ =20 -#ifndef LIBVIRT_DATATYPES_H -# define LIBVIRT_DATATYPES_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "driver.h" -# include "virthread.h" -# include "virobject.h" -# include "viruuid.h" +#include "driver.h" +#include "virthread.h" +#include "virobject.h" +#include "viruuid.h" =20 extern virClassPtr virConnectClass; extern virClassPtr virDomainClass; @@ -47,7 +46,7 @@ extern virClassPtr virAdmConnectClass; extern virClassPtr virAdmServerClass; extern virClassPtr virAdmClientClass; =20 -# define virCheckConnectReturn(obj, retval) \ +#define virCheckConnectReturn(obj, retval) \ do { \ if (!virObjectIsClass(obj, virConnectClass)) { \ virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INVALID_CONN, \ @@ -57,7 +56,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckConnectGoto(obj, label) \ +#define virCheckConnectGoto(obj, label) \ do { \ if (!virObjectIsClass(obj, virConnectClass)) { \ virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INVALID_CONN, \ @@ -67,7 +66,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckDomainReturn(obj, retval) \ +#define virCheckDomainReturn(obj, retval) \ do { \ virDomainPtr _dom =3D (obj); \ if (!virObjectIsClass(_dom, virDomainClass) || \ @@ -79,7 +78,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckDomainGoto(obj, label) \ +#define virCheckDomainGoto(obj, label) \ do { \ virDomainPtr _dom =3D (obj); \ if (!virObjectIsClass(_dom, virDomainClass) || \ @@ -91,7 +90,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckNetworkReturn(obj, retval) \ +#define virCheckNetworkReturn(obj, retval) \ do { \ virNetworkPtr _net =3D (obj); \ if (!virObjectIsClass(_net, virNetworkClass) || \ @@ -104,7 +103,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckNetworkGoto(obj, label) \ +#define virCheckNetworkGoto(obj, label) \ do { \ virNetworkPtr _net =3D (obj); \ if (!virObjectIsClass(_net, virNetworkClass) || \ @@ -117,7 +116,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckInterfaceReturn(obj, retval) \ +#define virCheckInterfaceReturn(obj, retval) \ do { \ virInterfacePtr _iface =3D (obj); \ if (!virObjectIsClass(_iface, virInterfaceClass) || \ @@ -131,7 +130,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckStoragePoolReturn(obj, retval) \ +#define virCheckStoragePoolReturn(obj, retval) \ do { \ virStoragePoolPtr _pool =3D (obj); \ if (!virObjectIsClass(_pool, virStoragePoolClass) || \ @@ -145,7 +144,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckStoragePoolGoto(obj, label) \ +#define virCheckStoragePoolGoto(obj, label) \ do { \ virStoragePoolPtr _pool=3D (obj); \ if (!virObjectIsClass(_pool, virStoragePoolClass) || \ @@ -158,7 +157,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckStorageVolReturn(obj, retval) \ +#define virCheckStorageVolReturn(obj, retval) \ do { \ virStorageVolPtr _vol =3D (obj); \ if (!virObjectIsClass(_vol, virStorageVolClass) || \ @@ -171,7 +170,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckStorageVolGoto(obj, label) \ +#define virCheckStorageVolGoto(obj, label) \ do { \ virStorageVolPtr _vol =3D (obj); \ if (!virObjectIsClass(_vol, virStorageVolClass) || \ @@ -184,7 +183,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckNodeDeviceReturn(obj, retval) \ +#define virCheckNodeDeviceReturn(obj, retval) \ do { \ virNodeDevicePtr _node =3D (obj); \ if (!virObjectIsClass(_node, virNodeDeviceClass) || \ @@ -198,7 +197,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckNodeDeviceGoto(obj, label) \ +#define virCheckNodeDeviceGoto(obj, label) \ do { \ virNodeDevicePtr _dev=3D (obj); \ if (!virObjectIsClass(_dev, virNodeDeviceClass) || \ @@ -211,7 +210,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckSecretReturn(obj, retval) \ +#define virCheckSecretReturn(obj, retval) \ do { \ virSecretPtr _secret =3D (obj); \ if (!virObjectIsClass(_secret, virSecretClass) || \ @@ -225,7 +224,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckSecretGoto(obj, label) \ +#define virCheckSecretGoto(obj, label) \ do { \ virSecretPtr _secret =3D (obj); \ if (!virObjectIsClass(_secret, virSecretClass) || \ @@ -239,7 +238,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckStreamReturn(obj, retval) \ +#define virCheckStreamReturn(obj, retval) \ do { \ virStreamPtr _st =3D (obj); \ if (!virObjectIsClass(_st, virStreamClass) || \ @@ -252,7 +251,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckStreamGoto(obj, label) \ +#define virCheckStreamGoto(obj, label) \ do { \ virStreamPtr _st =3D (obj); \ if (!virObjectIsClass(_st, virStreamClass) || \ @@ -265,7 +264,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckNWFilterReturn(obj, retval) \ +#define virCheckNWFilterReturn(obj, retval) \ do { \ virNWFilterPtr _nw =3D (obj); \ if (!virObjectIsClass(_nw, virNWFilterClass) || \ @@ -279,7 +278,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckNWFilterBindingReturn(obj, retval) \ +#define virCheckNWFilterBindingReturn(obj, retval) \ do { \ virNWFilterBindingPtr _nw =3D (obj); \ if (!virObjectIsClass(_nw, virNWFilterBindingClass) || \ @@ -293,7 +292,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckDomainCheckpointReturn(obj, retval) \ +#define virCheckDomainCheckpointReturn(obj, retval) \ do { \ virDomainCheckpointPtr _check =3D (obj); \ if (!virObjectIsClass(_check, virDomainCheckpointClass) || \ @@ -308,7 +307,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckDomainSnapshotReturn(obj, retval) \ +#define virCheckDomainSnapshotReturn(obj, retval) \ do { \ virDomainSnapshotPtr _snap =3D (obj); \ if (!virObjectIsClass(_snap, virDomainSnapshotClass) || \ @@ -332,29 +331,29 @@ extern virClassPtr virAdmClientClass; * "define a(b,...) b,##__VA_ARGS__" as a means of eliding a comma * when no var-args are present, but we don't want to require gcc. */ -# define VIR_ARG15(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ - _11, _12, _13, _14, _15, ...) _15 -# define VIR_HAS_COMMA(...) VIR_ARG15(__VA_ARGS__, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, = 1, 0) +#define VIR_ARG15(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ + _11, _12, _13, _14, _15, ...) _15 +#define VIR_HAS_COMMA(...) VIR_ARG15(__VA_ARGS__, \ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1= , 0) =20 /* Form the name VIR_DOMAIN_DEBUG_[01], then call that macro, * according to how many arguments are present. Two-phase due to * macro expansion rules. */ -# define VIR_DOMAIN_DEBUG_EXPAND(a, b, ...) \ +#define VIR_DOMAIN_DEBUG_EXPAND(a, b, ...) \ VIR_DOMAIN_DEBUG_PASTE(a, b, __VA_ARGS__) -# define VIR_DOMAIN_DEBUG_PASTE(a, b, ...) \ +#define VIR_DOMAIN_DEBUG_PASTE(a, b, ...) \ a##b(__VA_ARGS__) =20 /* Internal use only, when VIR_DOMAIN_DEBUG has one argument. */ -# define VIR_DOMAIN_DEBUG_0(dom) \ +#define VIR_DOMAIN_DEBUG_0(dom) \ VIR_DOMAIN_DEBUG_2(dom, "%s", "") =20 /* Internal use only, when VIR_DOMAIN_DEBUG has three or more arguments. = */ -# define VIR_DOMAIN_DEBUG_1(dom, fmt, ...) \ +#define VIR_DOMAIN_DEBUG_1(dom, fmt, ...) \ VIR_DOMAIN_DEBUG_2(dom, ", " fmt, __VA_ARGS__) =20 /* Internal use only, with final format. */ -# define VIR_DOMAIN_DEBUG_2(dom, fmt, ...) \ +#define VIR_DOMAIN_DEBUG_2(dom, fmt, ...) \ do { \ char _uuidstr[VIR_UUID_STRING_BUFLEN]; \ const char *_domname =3D NULL; \ @@ -370,7 +369,7 @@ extern virClassPtr virAdmClientClass; dom, NULLSTR(_domname), _uuidstr, __VA_ARGS__); \ } while (0) =20 -# define virCheckAdmConnectReturn(obj, retval) \ +#define virCheckAdmConnectReturn(obj, retval) \ do { \ if (!virObjectIsClass(obj, virAdmConnectClass)) { \ virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INVALID_CONN, \ @@ -380,7 +379,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckAdmConnectGoto(obj, label) \ +#define virCheckAdmConnectGoto(obj, label) \ do { \ if (!virObjectIsClass(obj, virAdmConnectClass)) { \ virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INVALID_CONN, \ @@ -390,7 +389,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0) =20 -# define virCheckAdmServerReturn(obj, retval) \ +#define virCheckAdmServerReturn(obj, retval) \ do { \ virAdmServerPtr _srv =3D (obj); \ if (!virObjectIsClass(_srv, virAdmServerClass) || \ @@ -402,7 +401,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckAdmServerGoto(obj, label) \ +#define virCheckAdmServerGoto(obj, label) \ do { \ virAdmServerPtr _srv =3D (obj); \ if (!virObjectIsClass(_srv, virAdmServerClass) || \ @@ -414,7 +413,7 @@ extern virClassPtr virAdmClientClass; } \ } while (0); =20 -# define virCheckAdmClientReturn(obj, retval) \ +#define virCheckAdmClientReturn(obj, retval) \ do { \ virAdmClientPtr _clt =3D (obj); \ if (!virObjectIsClass(_clt, virAdmClientClass) || \ @@ -427,7 +426,7 @@ extern virClassPtr virAdmClientClass; return retval; \ } \ } while (0) -# define virCheckAdmClientGoto(obj, label) \ +#define virCheckAdmClientGoto(obj, label) \ do { \ virAdmClientPtr _clt =3D (obj); \ if (!virObjectIsClass(_clt, virAdmClientClass) || \ @@ -446,7 +445,7 @@ extern virClassPtr virAdmClientClass; * @fmt: optional format for additional information * @...: optional arguments corresponding to @fmt. */ -# define VIR_DOMAIN_DEBUG(...) \ +#define VIR_DOMAIN_DEBUG(...) \ VIR_DOMAIN_DEBUG_EXPAND(VIR_DOMAIN_DEBUG_, \ VIR_HAS_COMMA(__VA_ARGS__), \ __VA_ARGS__) @@ -808,5 +807,3 @@ int virAdmConnectCloseCallbackDataRegister(virAdmConnec= tCloseCallbackDataPtr cbd virFreeCallback freecb); int virAdmConnectCloseCallbackDataUnregister(virAdmConnectCloseCallbackDat= aPtr cbdata, virAdmConnectCloseFunc cb); - -#endif /* LIBVIRT_DATATYPES_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938974; cv=none; d=zoho.com; s=zohoarc; b=baF2jU1vjApE7Y5sUTFPOAP32YaX/JzQ8ZIhNppRG+XK3nM9vw5giY8QJr4ke7soHr7AibIurL2Q97Z4IjmkV7m53ZCvL8BFf0toLZDkDacAFy/qWf5Ug9xKNRmmUk+hiVKZKUurfeTTbEB61YK+f4N90210SgIUOAt0Dpn7PEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938974; 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:ARC-Authentication-Results; bh=ucD6AAihrxrX7Zcxf5ru1OcXnBsLlCWfstoT7lB2fpU=; b=WR6tv5D0RCjz9Pr1rZxmxcuUNhIhHgomAL4uM2UwusgXX0BEcLL+5lbWTkTMbffXK8QmfCS7OMt4QgxqMDhADWprlaR7Mw9GaFcurzv8Fq5XaGdL9zR7PWChYC+4Zs93nN1nZ04D2Xb76IFPZu2ukB3qdefolhziMlMbn9pWtyc= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938974112869.5108213890406; Fri, 7 Jun 2019 13:22:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 094323078AAC; Fri, 7 Jun 2019 20:22:47 +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 CDD045D9C6; Fri, 7 Jun 2019 20:22:45 +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 8C8091806B1C; Fri, 7 Jun 2019 20:22:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKgS9025753 for ; Fri, 7 Jun 2019 16:20:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 09B2D5C205; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB10C5C220 for ; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:24 -0500 Message-Id: <20190607202030.29625-14-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/19] src/esx: use #pragma once in headers 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 07 Jun 2019 20:22:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/esx/esx_driver.h | 5 +--- src/esx/esx_interface_driver.h | 7 ++---- src/esx/esx_network_driver.h | 7 ++---- src/esx/esx_private.h | 15 +++++------- src/esx/esx_storage_backend_iscsi.h | 7 ++---- src/esx/esx_storage_backend_vmfs.h | 7 ++---- src/esx/esx_storage_driver.h | 7 ++---- src/esx/esx_stream.h | 9 +++---- src/esx/esx_util.h | 13 ++++------ src/esx/esx_vi.h | 37 +++++++++++++---------------- src/esx/esx_vi_methods.h | 11 ++++----- src/esx/esx_vi_types.h | 13 ++++------ 12 files changed, 51 insertions(+), 87 deletions(-) diff --git a/src/esx/esx_driver.h b/src/esx/esx_driver.h index 6c8f32c9d6..f37fec4867 100644 --- a/src/esx/esx_driver.h +++ b/src/esx/esx_driver.h @@ -20,9 +20,6 @@ * */ =20 -#ifndef LIBVIRT_ESX_DRIVER_H -# define LIBVIRT_ESX_DRIVER_H +#pragma once =20 int esxRegister(void); - -#endif /* LIBVIRT_ESX_DRIVER_H */ diff --git a/src/esx/esx_interface_driver.h b/src/esx/esx_interface_driver.h index 20e4fe60d0..014e9d06d4 100644 --- a/src/esx/esx_interface_driver.h +++ b/src/esx/esx_interface_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_INTERFACE_DRIVER_H -# define LIBVIRT_ESX_INTERFACE_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virInterfaceDriver esxInterfaceDriver; - -#endif /* LIBVIRT_ESX_INTERFACE_DRIVER_H */ diff --git a/src/esx/esx_network_driver.h b/src/esx/esx_network_driver.h index c977a1abcf..b15e160c69 100644 --- a/src/esx/esx_network_driver.h +++ b/src/esx/esx_network_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_NETWORK_DRIVER_H -# define LIBVIRT_ESX_NETWORK_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virNetworkDriver esxNetworkDriver; - -#endif /* LIBVIRT_ESX_NETWORK_DRIVER_H */ diff --git a/src/esx/esx_private.h b/src/esx/esx_private.h index abb4567e8f..15edab4aa1 100644 --- a/src/esx/esx_private.h +++ b/src/esx/esx_private.h @@ -19,14 +19,13 @@ * */ =20 -#ifndef LIBVIRT_ESX_PRIVATE_H -# define LIBVIRT_ESX_PRIVATE_H +#pragma once =20 -# include "internal.h" -# include "virerror.h" -# include "capabilities.h" -# include "domain_conf.h" -# include "esx_vi.h" +#include "internal.h" +#include "virerror.h" +#include "capabilities.h" +#include "domain_conf.h" +#include "esx_vi.h" =20 typedef struct _esxPrivate { esxVI_Context *primary; /* points to host or vCenter */ @@ -41,5 +40,3 @@ typedef struct _esxPrivate { esxVI_Boolean supportsScreenshot; int32_t usedCpuTimeCounterId; } esxPrivate; - -#endif /* LIBVIRT_ESX_PRIVATE_H */ diff --git a/src/esx/esx_storage_backend_iscsi.h b/src/esx/esx_storage_back= end_iscsi.h index 09ca4ac813..7d62060122 100644 --- a/src/esx/esx_storage_backend_iscsi.h +++ b/src/esx/esx_storage_backend_iscsi.h @@ -19,11 +19,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H -# define LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageBackendISCSI; - -#endif /* LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H */ diff --git a/src/esx/esx_storage_backend_vmfs.h b/src/esx/esx_storage_backe= nd_vmfs.h index 67b8af38cc..153996d6c6 100644 --- a/src/esx/esx_storage_backend_vmfs.h +++ b/src/esx/esx_storage_backend_vmfs.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H -# define LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageBackendVMFS; - -#endif /* LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H */ diff --git a/src/esx/esx_storage_driver.h b/src/esx/esx_storage_driver.h index 73110cf8e6..3c487355c8 100644 --- a/src/esx/esx_storage_driver.h +++ b/src/esx/esx_storage_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_DRIVER_H -# define LIBVIRT_ESX_STORAGE_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageDriver; - -#endif /* LIBVIRT_ESX_STORAGE_DRIVER_H */ diff --git a/src/esx/esx_stream.h b/src/esx/esx_stream.h index f00b4443aa..29ca014c67 100644 --- a/src/esx/esx_stream.h +++ b/src/esx/esx_stream.h @@ -19,14 +19,11 @@ * */ =20 -#ifndef LIBVIRT_ESX_STREAM_H -# define LIBVIRT_ESX_STREAM_H +#pragma once =20 -# include "internal.h" -# include "esx_private.h" +#include "internal.h" +#include "esx_private.h" =20 int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char = *url); int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const cha= r *url, unsigned long long offset, unsigned long long le= ngth); - -#endif /* LIBVIRT_ESX_STREAM_H */ diff --git a/src/esx/esx_util.h b/src/esx/esx_util.h index 163626688e..d80093dcb5 100644 --- a/src/esx/esx_util.h +++ b/src/esx/esx_util.h @@ -19,14 +19,13 @@ * */ =20 -#ifndef LIBVIRT_ESX_UTIL_H -# define LIBVIRT_ESX_UTIL_H +#pragma once =20 -# include -# include "internal.h" -# include "viruri.h" +#include +#include "internal.h" +#include "viruri.h" =20 -# define ESX_VI_CHECK_ARG_LIST(val) \ +#define ESX_VI_CHECK_ARG_LIST(val) \ do { \ if (!val || *val) { \ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argume= nt")); \ @@ -69,5 +68,3 @@ void esxUtil_ReplaceSpecialWindowsPathChars(char *string); char *esxUtil_EscapeDatastoreItem(const char *string); =20 char *esxUtil_EscapeForXml(const char *string); - -#endif /* LIBVIRT_ESX_UTIL_H */ diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h index ff2abfb034..bff2782ba1 100644 --- a/src/esx/esx_vi.h +++ b/src/esx/esx_vi.h @@ -20,25 +20,24 @@ * */ =20 -#ifndef LIBVIRT_ESX_VI_H -# define LIBVIRT_ESX_VI_H +#pragma once =20 -# include -# include -# include +#include +#include +#include =20 -# include "internal.h" -# include "virerror.h" -# include "datatypes.h" -# include "esx_vi_types.h" -# include "esx_util.h" +#include "internal.h" +#include "virerror.h" +#include "datatypes.h" +#include "esx_vi_types.h" +#include "esx_util.h" =20 /* curl_multi_wait was added in libcurl 7.28.0, emulate it on older versio= ns */ -# define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00) +#define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00) =20 =20 =20 -# define ESX_VI__SOAP__REQUEST_HEADER \ +#define ESX_VI__SOAP__REQUEST_HEADER \ "\n" \ "\n" \ "" =20 =20 =20 -# define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \ +#define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \ do { \ virBufferAddLit(_buffer, "<"); \ virBufferAdd(_buffer, _element, -1); \ @@ -66,7 +65,7 @@ =20 =20 =20 -# define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \ +#define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \ do { \ virBufferAddLit(_buffer, " (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938975059524.9709283051985; Fri, 7 Jun 2019 13:22:55 -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 8F433308427E; Fri, 7 Jun 2019 20:22:48 +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 63E365C220; Fri, 7 Jun 2019 20:22:47 +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 B25B3206D7; Fri, 7 Jun 2019 20:22:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKgVm025760 for ; Fri, 7 Jun 2019 16:20:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5B91C5C206; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A1705C205 for ; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:25 -0500 Message-Id: <20190607202030.29625-15-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 14/19] src/hyperv: use #pragma once in headers 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: , 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.40]); Fri, 07 Jun 2019 20:22:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/hyperv/hyperv_driver.h | 5 +---- src/hyperv/hyperv_private.h | 13 +++++------- src/hyperv/hyperv_util.h | 9 +++------ src/hyperv/hyperv_wmi.h | 21 +++++++++----------- src/hyperv/hyperv_wmi_classes.h | 27 +++++++++++-------------- src/hyperv/openwsman.h | 35 +++++++++++++++------------------ 6 files changed, 46 insertions(+), 64 deletions(-) diff --git a/src/hyperv/hyperv_driver.h b/src/hyperv/hyperv_driver.h index f333fba3e1..8099b5714b 100644 --- a/src/hyperv/hyperv_driver.h +++ b/src/hyperv/hyperv_driver.h @@ -20,9 +20,6 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_DRIVER_H -# define LIBVIRT_HYPERV_DRIVER_H +#pragma once =20 int hypervRegister(void); - -#endif /* LIBVIRT_HYPERV_DRIVER_H */ diff --git a/src/hyperv/hyperv_private.h b/src/hyperv/hyperv_private.h index f8d8f7deff..b502e71d83 100644 --- a/src/hyperv/hyperv_private.h +++ b/src/hyperv/hyperv_private.h @@ -20,13 +20,12 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_PRIVATE_H -# define LIBVIRT_HYPERV_PRIVATE_H +#pragma once =20 -# include "internal.h" -# include "virerror.h" -# include "hyperv_util.h" -# include "openwsman.h" +#include "internal.h" +#include "virerror.h" +#include "hyperv_util.h" +#include "openwsman.h" =20 typedef enum _hypervWmiVersion hypervWmiVersion; enum _hypervWmiVersion { @@ -40,5 +39,3 @@ struct _hypervPrivate { WsManClient *client; hypervWmiVersion wmiVersion; }; - -#endif /* LIBVIRT_HYPERV_PRIVATE_H */ diff --git a/src/hyperv/hyperv_util.h b/src/hyperv/hyperv_util.h index c72a308da9..67d698450d 100644 --- a/src/hyperv/hyperv_util.h +++ b/src/hyperv/hyperv_util.h @@ -19,11 +19,10 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_UTIL_H -# define LIBVIRT_HYPERV_UTIL_H +#pragma once =20 -# include "internal.h" -# include "viruri.h" +#include "internal.h" +#include "viruri.h" =20 typedef struct _hypervParsedUri hypervParsedUri; =20 @@ -34,5 +33,3 @@ struct _hypervParsedUri { int hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri); =20 void hypervFreeParsedUri(hypervParsedUri **parsedUri); - -#endif /* LIBVIRT_HYPERV_UTIL_H */ diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index e3ace01131..74a74e0e09 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -21,21 +21,20 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_WMI_H -# define LIBVIRT_HYPERV_WMI_H +#pragma once =20 -# include "virbuffer.h" -# include "hyperv_private.h" -# include "hyperv_wmi_classes.h" -# include "openwsman.h" -# include "virhash.h" +#include "virbuffer.h" +#include "hyperv_private.h" +#include "hyperv_wmi_classes.h" +#include "openwsman.h" +#include "virhash.h" =20 =20 -# define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL } +#define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL } =20 -# define HYPERV_DEFAULT_PARAM_COUNT 5 +#define HYPERV_DEFAULT_PARAM_COUNT 5 =20 -# define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \ +#define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \ "CreationClassName=3DMsvm_VirtualSystemManagementService" =20 int hypervVerifyResponse(WsManClient *client, WsXmlDocH response, @@ -252,5 +251,3 @@ int hypervMsvmComputerSystemToDomain(virConnectPtr conn, =20 int hypervMsvmComputerSystemFromDomain(virDomainPtr domain, Msvm_ComputerSystem **computerSyste= m); - -#endif /* LIBVIRT_HYPERV_WMI_H */ diff --git a/src/hyperv/hyperv_wmi_classes.h b/src/hyperv/hyperv_wmi_classe= s.h index cf2ae75447..a19b6a656d 100644 --- a/src/hyperv/hyperv_wmi_classes.h +++ b/src/hyperv/hyperv_wmi_classes.h @@ -21,21 +21,20 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_WMI_CLASSES_H -# define LIBVIRT_HYPERV_WMI_CLASSES_H +#pragma once =20 -# include "internal.h" -# include "openwsman.h" +#include "internal.h" +#include "openwsman.h" =20 -# include "hyperv_wmi_classes.generated.typedef" +#include "hyperv_wmi_classes.generated.typedef" =20 -# define ROOT_CIMV2 \ +#define ROOT_CIMV2 \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/*" =20 -# define ROOT_VIRTUALIZATION \ +#define ROOT_VIRTUALIZATION \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/*" =20 -# define ROOT_VIRTUALIZATION_V2 \ +#define ROOT_VIRTUALIZATION_V2 \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/= *" =20 =20 @@ -44,16 +43,16 @@ * Msvm_ComputerSystem */ =20 -# define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \ +#define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \ "Description =3D \"Microsoft Virtual Machine\" " =20 -# define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \ +#define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \ "Description =3D \"Microsoft Hosting Computer System\" " =20 -# define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \ +#define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \ "(EnabledState !=3D 0 and EnabledState !=3D 3 and EnabledState !=3D 32= 769) " =20 -# define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \ +#define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \ "(EnabledState =3D 0 or EnabledState =3D 3 or EnabledState =3D 32769) " =20 enum _Msvm_ComputerSystem_EnabledState { @@ -138,6 +137,4 @@ struct _hypervWmiClassInfoList { hypervWmiClassInfoPtr *objs; }; =20 -# include "hyperv_wmi_classes.generated.h" - -#endif /* LIBVIRT_HYPERV_WMI_CLASSES_H */ +#include "hyperv_wmi_classes.generated.h" diff --git a/src/hyperv/openwsman.h b/src/hyperv/openwsman.h index 3f19a8f890..cd7660ac2e 100644 --- a/src/hyperv/openwsman.h +++ b/src/hyperv/openwsman.h @@ -19,32 +19,29 @@ * */ =20 -#ifndef LIBVIRT_OPENWSMAN_H -# define LIBVIRT_OPENWSMAN_H +#pragma once =20 /* Workaround openwsman <=3D 2.2.6 unconditionally defining optarg. Just p= retend * that u/os.h was already included. Need to explicitly include time.h bec= ause * wsman-xml-serializer.h needs it and u/os.h would have included it. */ -# include -# define _LIBU_OS_H_ -# include +#include +#define _LIBU_OS_H_ +#include =20 /* wsman-xml-serializer.h in openwsman <=3D 2.2.6 is missing this defines = */ -# ifndef SER_NS_INT8 -# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT16 -# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT32 -# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT64 -# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0) -# endif +#ifndef SER_NS_INT8 +# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT16 +# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT32 +# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT64 +# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0) +#endif =20 /* wsman-xml.h */ WsXmlDocH ws_xml_create_doc(const char *rootNsUri, const char *rootName); WsXmlNodeH xml_parser_get_root(WsXmlDocH doc); - -#endif /* LIBVIRT_OPENWSMAN_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938982; cv=none; d=zoho.com; s=zohoarc; b=ESkqjRs87Bwbd+JjBQJzgkhvRalv2CrCkQ11W+BcBoQ370HXE2k7zk3rZCy9jFNg5MlRnSleqtSIQImqds+NBZ+8CHHOgw987VwPEJ1kXmF/iHa6YvogLoByeYnQf9YgJSCpLyEn32jfP4kKKhnaLniGfDiKTLzZQB9mAzzw/Fk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938982; 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:ARC-Authentication-Results; bh=Jnfi2LtG5FJofptFd3bif9pUjAvCPy8uZtTHMALYtJw=; b=TcucS7HQxPfD1d99/QKc9lThKmjllLTrJtzYL23x/qacaM9D8K1atBCj/paLuPjJ+FHsru6FvkplLDsZCnH4mDmoODF5lA0NIHoZK2G+SMYyXLZwUKplE9dhG8bpyU1OmsTtkHfgIgMjJvy35hK/zfD/JzxQ6tJk8kvmwdi1Zjk= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155993898256745.30471394904987; Fri, 7 Jun 2019 13:23:02 -0700 (PDT) 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 CFD3E30BC56F; Fri, 7 Jun 2019 20:22:59 +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 4EE866012D; Fri, 7 Jun 2019 20:22:58 +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 1248D1806B1C; Fri, 7 Jun 2019 20:22:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKgrc025765 for ; Fri, 7 Jun 2019 16:20:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB55C5C206; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79FF95C205 for ; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:26 -0500 Message-Id: <20190607202030.29625-16-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/19] src/interface: use #pragma once in headers 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: , 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.49]); Fri, 07 Jun 2019 20:23:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/interface/interface_driver.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/interface/interface_driver.h b/src/interface/interface_dri= ver.h index 242e00a824..eee01d4aec 100644 --- a/src/interface/interface_driver.h +++ b/src/interface/interface_driver.h @@ -18,12 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_INTERFACE_DRIVER_H -# define LIBVIRT_INTERFACE_DRIVER_H +#pragma once =20 int interfaceRegister(void); =20 int netcfIfaceRegister(void); int udevIfaceRegister(void); - -#endif /* LIBVIRT_INTERFACE_DRIVER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938982; cv=none; d=zoho.com; s=zohoarc; b=JTHAV8Gpif3ZFPBtFoNCSX7EFAYXwHVBBlb4D/1A6TSDSjR/QINg6sODiSAyHrhARI2YK6WBhySUj1RXjvvb6Oa0BUAWuA3zISiFbsafeMmqbDTglseiew998/XgxS010hsjGbUwHuOxoOTKmz772gIenfVv1R4yCqyAQTpaHXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938982; 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:ARC-Authentication-Results; bh=9rDI5bBAuu+S1XUFcClXKVJ7qGaBAbT+RN55iFelA80=; b=CbxXVcC8LH1sE8n5UCuwr2fbghNC22zbjpTNRyZe+wGT72LP5ev4+9tRS9JhYpPBsplERmIQe4xJQ1MYgtC98ePfvy+AXII8MCEcu/ERfio9fcYzdm6n6whQjO0bI+qNMHZXR2ACnvDwucB16k/yycVPf353BNf16WNyRV+4mOo= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155993898208098.96005607564848; Fri, 7 Jun 2019 13:23:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A73130860C7; Fri, 7 Jun 2019 20:23:00 +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 51B4719C79; Fri, 7 Jun 2019 20:22:59 +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 16552206DD; Fri, 7 Jun 2019 20:22:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKhTe025770 for ; Fri, 7 Jun 2019 16:20:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 07C005C206; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAC7C5C205 for ; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:27 -0500 Message-Id: <20190607202030.29625-17-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/19] src/internal.h: use #pragma once 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 07 Jun 2019 20:23:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/internal.h | 295 ++++++++++++++++++++++++------------------------- 1 file changed, 146 insertions(+), 149 deletions(-) diff --git a/src/internal.h b/src/internal.h index 5a868bb00c..f718895460 100644 --- a/src/internal.h +++ b/src/internal.h @@ -18,101 +18,100 @@ * . */ =20 -#ifndef LIBVIRT_INTERNAL_H -# define LIBVIRT_INTERNAL_H - -# include -# include -# include -# include -# include -# include -# include - -# if STATIC_ANALYSIS -# undef NDEBUG /* Don't let a prior NDEBUG definition cause trouble. */ -# include -# define sa_assert(expr) assert (expr) -# else -# define sa_assert(expr) /* empty */ -# endif +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#if STATIC_ANALYSIS +# undef NDEBUG /* Don't let a prior NDEBUG definition cause trouble. */ +# include +# define sa_assert(expr) assert (expr) +#else +# define sa_assert(expr) /* empty */ +#endif =20 /* The library itself is allowed to use deprecated functions / * variables, so effectively undefine the deprecated attribute * which would otherwise be defined in libvirt.h. */ -# undef VIR_DEPRECATED -# define VIR_DEPRECATED /*empty*/ +#undef VIR_DEPRECATED +#define VIR_DEPRECATED /*empty*/ =20 /* The library itself needs to know enum sizes. */ -# define VIR_ENUM_SENTINELS - -# ifdef HAVE_LIBINTL_H -# define DEFAULT_TEXT_DOMAIN PACKAGE -# include -# define _(str) dgettext(PACKAGE, str) -# else /* HAVE_LIBINTL_H */ -# define _(str) str -# endif /* HAVE_LIBINTL_H */ -# define N_(str) str - -# include "libvirt/libvirt.h" -# include "libvirt/libvirt-lxc.h" -# include "libvirt/libvirt-qemu.h" -# include "libvirt/libvirt-admin.h" -# include "libvirt/virterror.h" - -# include "c-strcase.h" -# include "ignore-value.h" -# include "count-leading-zeros.h" +#define VIR_ENUM_SENTINELS + +#ifdef HAVE_LIBINTL_H +# define DEFAULT_TEXT_DOMAIN PACKAGE +# include +# define _(str) dgettext(PACKAGE, str) +#else /* HAVE_LIBINTL_H */ +# define _(str) str +#endif /* HAVE_LIBINTL_H */ +#define N_(str) str + +#include "libvirt/libvirt.h" +#include "libvirt/libvirt-lxc.h" +#include "libvirt/libvirt-qemu.h" +#include "libvirt/libvirt-admin.h" +#include "libvirt/virterror.h" + +#include "c-strcase.h" +#include "ignore-value.h" +#include "count-leading-zeros.h" =20 /* String equality tests, suggested by Jim Meyering. */ -# define STREQ(a, b) (strcmp(a, b) =3D=3D 0) -# define STRCASEEQ(a, b) (c_strcasecmp(a, b) =3D=3D 0) -# define STRNEQ(a, b) (strcmp(a, b) !=3D 0) -# define STRCASENEQ(a, b) (c_strcasecmp(a, b) !=3D 0) -# define STREQLEN(a, b, n) (strncmp(a, b, n) =3D=3D 0) -# define STRCASEEQLEN(a, b, n) (c_strncasecmp(a, b, n) =3D=3D 0) -# define STRNEQLEN(a, b, n) (strncmp(a, b, n) !=3D 0) -# define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) !=3D 0) -# define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) =3D=3D 0) -# define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) =3D=3D 0) -# define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL) - -# define STREQ_NULLABLE(a, b) \ +#define STREQ(a, b) (strcmp(a, b) =3D=3D 0) +#define STRCASEEQ(a, b) (c_strcasecmp(a, b) =3D=3D 0) +#define STRNEQ(a, b) (strcmp(a, b) !=3D 0) +#define STRCASENEQ(a, b) (c_strcasecmp(a, b) !=3D 0) +#define STREQLEN(a, b, n) (strncmp(a, b, n) =3D=3D 0) +#define STRCASEEQLEN(a, b, n) (c_strncasecmp(a, b, n) =3D=3D 0) +#define STRNEQLEN(a, b, n) (strncmp(a, b, n) !=3D 0) +#define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) !=3D 0) +#define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) =3D=3D 0) +#define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) =3D=3D 0) +#define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL) + +#define STREQ_NULLABLE(a, b) \ ((a) ? (b) && STREQ((a), (b)) : !(b)) -# define STRNEQ_NULLABLE(a, b) \ +#define STRNEQ_NULLABLE(a, b) \ ((a) ? !(b) || STRNEQ((a), (b)) : !!(b)) =20 -# define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] =3D '\0'; } while (0) -# define ARRAY_CARDINALITY(Array) (sizeof(Array) / sizeof(*(Array))) +#define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] =3D '\0'; } while (0) +#define ARRAY_CARDINALITY(Array) (sizeof(Array) / sizeof(*(Array))) =20 /** * ATTRIBUTE_UNUSED: * * Macro to flag consciously unused parameters to functions */ -# ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__((__unused__)) -# endif +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__((__unused__)) +#endif =20 /** * ATTRIBUTE_NORETURN: * * Macro to indicate that a function won't return to the caller */ -# ifndef ATTRIBUTE_NORETURN -# define ATTRIBUTE_NORETURN __attribute__((__noreturn__)) -# endif +#ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#endif =20 /** * ATTRIBUTE_SENTINEL: * * Macro to check for NULL-terminated varargs lists */ -# ifndef ATTRIBUTE_SENTINEL -# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__)) -# endif +#ifndef ATTRIBUTE_SENTINEL +# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__)) +#endif =20 /** * ATTRIBUTE_NOINLINE: @@ -120,9 +119,9 @@ * Force compiler not to inline a method. Should be used if * the method need to be overridable by test mocks. */ -# ifndef ATTRIBUTE_NOINLINE -# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) -# endif +#ifndef ATTRIBUTE_NOINLINE +# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) +#endif =20 /** * ATTRIBUTE_FMT_PRINTF @@ -134,19 +133,19 @@ * printf format specifiers even on broken Win32 platforms * hence we have to force 'gnu_printf' for new GCC */ -# ifndef ATTRIBUTE_FMT_PRINTF -# ifndef __clang__ -# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \ +#ifndef ATTRIBUTE_FMT_PRINTF +# ifndef __clang__ +# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \ __attribute__((__format__ (__gnu_printf__, fmtpos, argpos))) -# else -# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \ +# else +# define ATTRIBUTE_FMT_PRINTF(fmtpos, argpos) \ __attribute__((__format__ (__printf__, fmtpos, argpos))) -# endif # endif +#endif =20 -# ifndef ATTRIBUTE_RETURN_CHECK -# define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) -# endif +#ifndef ATTRIBUTE_RETURN_CHECK +# define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) +#endif =20 /** * ATTRIBUTE_PACKED @@ -157,9 +156,9 @@ * ethernet packets. * Others compiler than gcc may use something different e.g. #pragma pack(= 1) */ -# ifndef ATTRIBUTE_PACKED -# define ATTRIBUTE_PACKED __attribute__((packed)) -# endif +#ifndef ATTRIBUTE_PACKED +# define ATTRIBUTE_PACKED __attribute__((packed)) +#endif =20 /* gcc's handling of attribute nonnull is less than stellar - it does * NOT improve diagnostics, and merely allows gcc to optimize away @@ -170,97 +169,97 @@ * based on whether we are compiling for real or for analysis, while * still requiring correct gcc syntax when it is turned off. See also * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D17308 */ -# ifndef ATTRIBUTE_NONNULL -# if STATIC_ANALYSIS -# define ATTRIBUTE_NONNULL(m) __attribute__((__nonnull__(m))) -# else -# define ATTRIBUTE_NONNULL(m) __attribute__(()) -# endif +#ifndef ATTRIBUTE_NONNULL +# if STATIC_ANALYSIS +# define ATTRIBUTE_NONNULL(m) __attribute__((__nonnull__(m))) +# else +# define ATTRIBUTE_NONNULL(m) __attribute__(()) # endif +#endif =20 -# ifndef ATTRIBUTE_FALLTHROUGH -# if __GNUC_PREREQ (7, 0) -# define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) -# else -# define ATTRIBUTE_FALLTHROUGH do {} while(0) -# endif +#ifndef ATTRIBUTE_FALLTHROUGH +# if __GNUC_PREREQ (7, 0) +# define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) +# else +# define ATTRIBUTE_FALLTHROUGH do {} while(0) # endif +#endif =20 -# if WORKING_PRAGMA_PUSH -# define VIR_WARNINGS_NO_CAST_ALIGN \ +#if WORKING_PRAGMA_PUSH +# define VIR_WARNINGS_NO_CAST_ALIGN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wcast-align\"") =20 -# define VIR_WARNINGS_NO_DEPRECATED \ +# define VIR_WARNINGS_NO_DEPRECATED \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") =20 -# if HAVE_SUGGEST_ATTRIBUTE_FORMAT -# define VIR_WARNINGS_NO_PRINTF \ +# if HAVE_SUGGEST_ATTRIBUTE_FORMAT +# define VIR_WARNINGS_NO_PRINTF \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=3Dformat\"") -# else -# define VIR_WARNINGS_NO_PRINTF \ +# else +# define VIR_WARNINGS_NO_PRINTF \ _Pragma ("GCC diagnostic push") -# endif +# endif =20 /* Workaround bogus GCC 6.0 for logical 'or' equal expression warnings. * (GCC bz 69602) */ -# if BROKEN_GCC_WLOGICALOP_EQUAL_EXPR -# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \ +# if BROKEN_GCC_WLOGICALOP_EQUAL_EXPR +# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wlogical-op\"") -# else -# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \ +# else +# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \ _Pragma ("GCC diagnostic push") -# endif +# endif =20 -# define VIR_WARNINGS_RESET \ +# define VIR_WARNINGS_RESET \ _Pragma ("GCC diagnostic pop") -# else -# define VIR_WARNINGS_NO_CAST_ALIGN -# define VIR_WARNINGS_NO_DEPRECATED -# define VIR_WARNINGS_NO_PRINTF -# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR -# define VIR_WARNINGS_RESET -# endif +#else +# define VIR_WARNINGS_NO_CAST_ALIGN +# define VIR_WARNINGS_NO_DEPRECATED +# define VIR_WARNINGS_NO_PRINTF +# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR +# define VIR_WARNINGS_RESET +#endif =20 /* Workaround bogus GCC < 4.6 that produces false -Wlogical-op warnings for * strchr(). Those old GCCs don't support push/pop. */ -# if BROKEN_GCC_WLOGICALOP_STRCHR -# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR \ +#if BROKEN_GCC_WLOGICALOP_STRCHR +# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR \ _Pragma ("GCC diagnostic ignored \"-Wlogical-op\"") -# else -# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR -# endif +#else +# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR +#endif =20 =20 /* * Use this when passing possibly-NULL strings to printf-a-likes. */ -# define NULLSTR(s) ((s) ? (s) : "") +#define NULLSTR(s) ((s) ? (s) : "") =20 /* * Turn a NULL string into an empty string */ -# define NULLSTR_EMPTY(s) ((s) ? (s) : "") +#define NULLSTR_EMPTY(s) ((s) ? (s) : "") =20 /* * Turn a NULL string into a star */ -# define NULLSTR_STAR(s) ((s) ? (s) : "*") +#define NULLSTR_STAR(s) ((s) ? (s) : "*") =20 /* * Turn a NULL string into a minus sign */ -# define NULLSTR_MINUS(s) ((s) ? (s) : "-") +#define NULLSTR_MINUS(s) ((s) ? (s) : "-") =20 /** * SWAP: * * In place exchange of two values */ -# define SWAP(a, b) \ +#define SWAP(a, b) \ do { \ (a) =3D (a) ^ (b); \ (b) =3D (a) ^ (b); \ @@ -273,7 +272,7 @@ * Steals pointer passed as second argument into the first argument. Second * argument must not have side effects. */ -# define VIR_STEAL_PTR(a, b) \ +#define VIR_STEAL_PTR(a, b) \ do { \ (a) =3D (b); \ (b) =3D NULL; \ @@ -287,7 +286,7 @@ * freed by using VIR_AUTOPTR can be easily passed back to the caller with= out * any temporary variable. @ptr is evaluated more than once. */ -# define VIR_RETURN_PTR(ptr) \ +#define VIR_RETURN_PTR(ptr) \ do { \ typeof(ptr) virTemporaryReturnPointer =3D (ptr); \ (ptr) =3D NULL; \ @@ -305,7 +304,7 @@ * Returns nothing. Exits the caller function if unsupported flags were * passed to it. */ -# define virCheckFlags(supported, retval) \ +#define virCheckFlags(supported, retval) \ do { \ unsigned long __unsuppflags =3D flags & ~(supported); \ if (__unsuppflags) { \ @@ -327,7 +326,7 @@ * Returns nothing. Jumps to a label if unsupported flags were * passed to it. */ -# define virCheckFlagsGoto(supported, label) \ +#define virCheckFlagsGoto(supported, label) \ do { \ unsigned long __unsuppflags =3D flags & ~(supported); \ if (__unsuppflags) { \ @@ -353,7 +352,7 @@ * This helper does an early return and therefore it has to be called * before anything that would require cleanup. */ -# define VIR_EXCLUSIVE_FLAGS_RET(FLAG1, FLAG2, RET) \ +#define VIR_EXCLUSIVE_FLAGS_RET(FLAG1, FLAG2, RET) \ do { \ if ((flags & FLAG1) && (flags & FLAG2)) { \ virReportInvalidArg(ctl, \ @@ -377,7 +376,7 @@ * Returns nothing. Jumps to a label if unsupported flags were * passed to it. */ -# define VIR_EXCLUSIVE_FLAGS_GOTO(FLAG1, FLAG2, LABEL) \ +#define VIR_EXCLUSIVE_FLAGS_GOTO(FLAG1, FLAG2, LABEL) \ do { \ if ((flags & FLAG1) && (flags & FLAG2)) { \ virReportInvalidArg(ctl, \ @@ -403,7 +402,7 @@ * This helper does an early return and therefore it has to be called * before anything that would require cleanup. */ -# define VIR_REQUIRE_FLAG_RET(FLAG1, FLAG2, RET) \ +#define VIR_REQUIRE_FLAG_RET(FLAG1, FLAG2, RET) \ do { \ if ((flags & FLAG1) && !(flags & FLAG2)) { \ virReportInvalidArg(ctl, \ @@ -425,7 +424,7 @@ * * Returns nothing. Jumps to a label if required flag is not set. */ -# define VIR_REQUIRE_FLAG_GOTO(FLAG1, FLAG2, LABEL) \ +#define VIR_REQUIRE_FLAG_GOTO(FLAG1, FLAG2, LABEL) \ do { \ if ((flags & FLAG1) && !(flags & FLAG2)) { \ virReportInvalidArg(ctl, \ @@ -435,28 +434,28 @@ } \ } while (0) =20 -# define virCheckNonNullArgReturn(argname, retval) \ +#define virCheckNonNullArgReturn(argname, retval) \ do { \ if (argname =3D=3D NULL) { \ virReportInvalidNonNullArg(argname); \ return retval; \ } \ } while (0) -# define virCheckNullArgGoto(argname, label) \ +#define virCheckNullArgGoto(argname, label) \ do { \ if (argname !=3D NULL) { \ virReportInvalidNullArg(argname); \ goto label; \ } \ } while (0) -# define virCheckNonNullArgGoto(argname, label) \ +#define virCheckNonNullArgGoto(argname, label) \ do { \ if (argname =3D=3D NULL) { \ virReportInvalidNonNullArg(argname); \ goto label; \ } \ } while (0) -# define virCheckNonEmptyStringArgGoto(argname, label) \ +#define virCheckNonEmptyStringArgGoto(argname, label) \ do { \ if (argname =3D=3D NULL) { \ virReportInvalidNonNullArg(argname); \ @@ -467,42 +466,42 @@ goto label; \ } \ } while (0) -# define virCheckPositiveArgGoto(argname, label) \ +#define virCheckPositiveArgGoto(argname, label) \ do { \ if (argname <=3D 0) { \ virReportInvalidPositiveArg(argname); \ goto label; \ } \ } while (0) -# define virCheckPositiveArgReturn(argname, retval) \ +#define virCheckPositiveArgReturn(argname, retval) \ do { \ if (argname <=3D 0) { \ virReportInvalidPositiveArg(argname); \ return retval; \ } \ } while (0) -# define virCheckNonZeroArgGoto(argname, label) \ +#define virCheckNonZeroArgGoto(argname, label) \ do { \ if (argname =3D=3D 0) { \ virReportInvalidNonZeroArg(argname); \ goto label; \ } \ } while (0) -# define virCheckZeroArgGoto(argname, label) \ +#define virCheckZeroArgGoto(argname, label) \ do { \ if (argname !=3D 0) { \ virReportInvalidNonZeroArg(argname); \ goto label; \ } \ } while (0) -# define virCheckNonNegativeArgGoto(argname, label) \ +#define virCheckNonNegativeArgGoto(argname, label) \ do { \ if (argname < 0) { \ virReportInvalidNonNegativeArg(argname); \ goto label; \ } \ } while (0) -# define virCheckReadOnlyGoto(flags, label) \ +#define virCheckReadOnlyGoto(flags, label) \ do { \ if ((flags) & VIR_CONNECT_RO) { \ virReportRestrictedError(_("read only access prevents %s"), \ @@ -514,14 +513,14 @@ =20 =20 /* divide value by size, rounding up */ -# define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size)) +#define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size)) =20 /* round up value to the closest multiple of size */ -# define VIR_ROUND_UP(value, size) (VIR_DIV_UP(value, size) * (size)) +#define VIR_ROUND_UP(value, size) (VIR_DIV_UP(value, size) * (size)) =20 /* Round up to the next closest power of 2. It will return rounded number = or 0 * for 0 or number more than 2^31 (for 32bit unsigned int). */ -# define VIR_ROUND_UP_POWER_OF_TWO(value) \ +#define VIR_ROUND_UP_POWER_OF_TWO(value) \ ((value) > 0 && (value) <=3D 1U << (sizeof(unsigned int) * 8 - 1) ? \ 1U << (sizeof(unsigned int) * 8 - count_leading_zeros((value) - 1)) := 0) =20 @@ -534,8 +533,6 @@ enum { EXIT_ENOENT =3D 127, /* Could not find program to exec */ }; =20 -# ifndef ENODATA -# define ENODATA EIO -# endif - -#endif /* LIBVIRT_INTERNAL_H */ +#ifndef ENODATA +# define ENODATA EIO +#endif --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938987; cv=none; d=zoho.com; s=zohoarc; b=K/smbE3BqdBxZXHQQq8G/t1PgA8/RObzRITWNi0ftODVTiQT8dg2/Xgwok0JkPjF/U7wA2A+eSM4tb4iWnB+skMXH7RB7kjnxiGfQ9KMcMFGhNIs+7XlQPCzmCtaZypgNBTfE5l0zp6o8PIJCqeDXLPkYnJdiVRFhn2dLMCbgAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938987; 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:ARC-Authentication-Results; bh=vqJawKGJ7EsAByVFp5SyUlP3lbeD0ZyVjgcwnbrokUM=; b=J65n3Xz8okq2fc/JLEDd/IFp7VSqh5G6Srjij2CaLAswTpzJj/gsGAV66NgPA3QiGofwiO33MuuB3oB91H9xG3Gj4Cw8NLdqbY8BCDnZmjpKBdRT4SHMDThJfs+FSOa34e2lSQf6XSWOcx68x+JJV3XW3Wl1pZX2SxUeIVrqHOA= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938987053454.36500339226313; Fri, 7 Jun 2019 13:23:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0867B2E95AF; Fri, 7 Jun 2019 20:23:05 +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 D25FF5D9D3; Fri, 7 Jun 2019 20:23:03 +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 9497B1806B23; Fri, 7 Jun 2019 20:23:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKhd6025778 for ; Fri, 7 Jun 2019 16:20:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5693E5C206; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 263C05C205 for ; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:28 -0500 Message-Id: <20190607202030.29625-18-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 17/19] src/libvirt_internal.h: use #pragma once 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 07 Jun 2019 20:23:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/libvirt_internal.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 8be1257814..3f012fdd4b 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -22,10 +22,9 @@ * include/libvirt/libvirt.h apply. ie this file is *append* only */ =20 -#ifndef LIBVIRT_LIBVIRT_INTERNAL_H -# define LIBVIRT_LIBVIRT_INTERNAL_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 typedef void (*virStateInhibitCallback)(bool inhibit, void *opaque); @@ -297,5 +296,3 @@ virTypedParameterValidateSet(virConnectPtr conn, int virStreamInData(virStreamPtr stream, int *data, long long *length); - -#endif /* LIBVIRT_LIBVIRT_INTERNAL_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938980; cv=none; d=zoho.com; s=zohoarc; b=MFdDvNBeyigy4dn0uNfYza5aSvV3OPu3WFEHUmEVh7RfVGiGacAfIjHEya490k7RYq3Xtfd2PX++DDESDbENeuwbT9F0ajTtheGpumCEOw/0GuMkmHD/pZ63HxG+EvlH6oet2EfxNXCiNQPcDa+hgLCpPu1cThtkIMShfNFxPkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938980; 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:ARC-Authentication-Results; bh=DTjMd4ymIQl93sifF+BV9ZdTLo4Qjm9Bv4nrS5Mom1I=; b=SESUZsaUuEq/6ptrhRLCWNvoLirpXQzbsGpbsmim2B2xTWRbpVeuyOq2pSHqgmj9PuY6BcvrLrH3a8+88YtHr5Ck+/dIJpW/7lYATatS8slUSKo899Q/r0WL85BoyokzINVg8YF9laDJb7g6X1JWhJtzkDigafD5XWzfTECjLW8= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155993898006031.740283581345466; Fri, 7 Jun 2019 13:23:00 -0700 (PDT) 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 91BE9307CDD5; Fri, 7 Jun 2019 20:22:58 +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 65B25600D1; Fri, 7 Jun 2019 20:22:57 +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 7D1DA206D9; Fri, 7 Jun 2019 20:22:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKh2l025788 for ; Fri, 7 Jun 2019 16:20:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id A6E5A5C206; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 760985C205 for ; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:29 -0500 Message-Id: <20190607202030.29625-19-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/19] src/libxl: use #pragma once in headers 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: , 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.49]); Fri, 07 Jun 2019 20:22:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/libxl/libxl_capabilities.h | 29 +++++----- src/libxl/libxl_conf.h | 101 ++++++++++++++++----------------- src/libxl/libxl_domain.h | 29 +++++----- src/libxl/libxl_driver.h | 5 +- src/libxl/libxl_logger.h | 7 +-- src/libxl/libxl_migration.h | 11 ++-- 6 files changed, 82 insertions(+), 100 deletions(-) diff --git a/src/libxl/libxl_capabilities.h b/src/libxl/libxl_capabilities.h index a0b9c10653..9a7c8bf636 100644 --- a/src/libxl/libxl_capabilities.h +++ b/src/libxl/libxl_capabilities.h @@ -18,27 +18,26 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_CAPABILITIES_H -# define LIBVIRT_LIBXL_CAPABILITIES_H +#pragma once =20 -# include +#include =20 -# include "virobject.h" -# include "capabilities.h" -# include "domain_capabilities.h" -# include "virfirmware.h" +#include "virobject.h" +#include "capabilities.h" +#include "domain_capabilities.h" +#include "virfirmware.h" =20 =20 -# ifndef LIBXL_FIRMWARE_DIR -# define LIBXL_FIRMWARE_DIR "/usr/lib/xen/boot" -# endif -# ifndef LIBXL_EXECBIN_DIR -# define LIBXL_EXECBIN_DIR "/usr/lib/xen/bin" -# endif +#ifndef LIBXL_FIRMWARE_DIR +# define LIBXL_FIRMWARE_DIR "/usr/lib/xen/boot" +#endif +#ifndef LIBXL_EXECBIN_DIR +# define LIBXL_EXECBIN_DIR "/usr/lib/xen/bin" +#endif =20 /* Used for prefix of ifname of any network name generated dynamically * by libvirt for Xen, and cannot be used for a persistent network name. = */ -# define LIBXL_GENERATED_PREFIX_XEN "vif" +#define LIBXL_GENERATED_PREFIX_XEN "vif" =20 bool libxlCapsHasPVUSB(void); =20 @@ -52,5 +51,3 @@ libxlMakeDomainCapabilities(virDomainCapsPtr domCaps, =20 int libxlDomainGetEmulatorType(const virDomainDef *def); - -#endif /* LIBVIRT_LIBXL_CAPABILITIES_H */ diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index fee94241af..136b5ae1ac 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -19,43 +19,42 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_CONF_H -# define LIBVIRT_LIBXL_CONF_H - -# include - -# include "internal.h" -# include "libvirt_internal.h" -# include "virdomainobjlist.h" -# include "domain_event.h" -# include "capabilities.h" -# include "configmake.h" -# include "virportallocator.h" -# include "virobject.h" -# include "virchrdev.h" -# include "virhostdev.h" -# include "locking/lock_manager.h" -# include "virfirmware.h" -# include "libxl_capabilities.h" -# include "libxl_logger.h" - -# define LIBXL_DRIVER_NAME "xenlight" -# define LIBXL_VNC_PORT_MIN 5900 -# define LIBXL_VNC_PORT_MAX 65535 - -# define LIBXL_MIGRATION_PORT_MIN 49152 -# define LIBXL_MIGRATION_PORT_MAX 49216 - -# define LIBXL_CONFIG_BASE_DIR SYSCONFDIR "/libvirt" -# define LIBXL_CONFIG_DIR SYSCONFDIR "/libvirt/libxl" -# define LIBXL_AUTOSTART_DIR LIBXL_CONFIG_DIR "/autostart" -# define LIBXL_STATE_DIR LOCALSTATEDIR "/run/libvirt/libxl" -# define LIBXL_LOG_DIR LOCALSTATEDIR "/log/libvirt/libxl" -# define LIBXL_LIB_DIR LOCALSTATEDIR "/lib/libvirt/libxl" -# define LIBXL_SAVE_DIR LIBXL_LIB_DIR "/save" -# define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump" -# define LIBXL_CHANNEL_DIR LIBXL_LIB_DIR "/channel/target" -# define LIBXL_BOOTLOADER_PATH "pygrub" +#pragma once + +#include + +#include "internal.h" +#include "libvirt_internal.h" +#include "virdomainobjlist.h" +#include "domain_event.h" +#include "capabilities.h" +#include "configmake.h" +#include "virportallocator.h" +#include "virobject.h" +#include "virchrdev.h" +#include "virhostdev.h" +#include "locking/lock_manager.h" +#include "virfirmware.h" +#include "libxl_capabilities.h" +#include "libxl_logger.h" + +#define LIBXL_DRIVER_NAME "xenlight" +#define LIBXL_VNC_PORT_MIN 5900 +#define LIBXL_VNC_PORT_MAX 65535 + +#define LIBXL_MIGRATION_PORT_MIN 49152 +#define LIBXL_MIGRATION_PORT_MAX 49216 + +#define LIBXL_CONFIG_BASE_DIR SYSCONFDIR "/libvirt" +#define LIBXL_CONFIG_DIR SYSCONFDIR "/libvirt/libxl" +#define LIBXL_AUTOSTART_DIR LIBXL_CONFIG_DIR "/autostart" +#define LIBXL_STATE_DIR LOCALSTATEDIR "/run/libvirt/libxl" +#define LIBXL_LOG_DIR LOCALSTATEDIR "/log/libvirt/libxl" +#define LIBXL_LIB_DIR LOCALSTATEDIR "/lib/libvirt/libxl" +#define LIBXL_SAVE_DIR LIBXL_LIB_DIR "/save" +#define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump" +#define LIBXL_CHANNEL_DIR LIBXL_LIB_DIR "/channel/target" +#define LIBXL_BOOTLOADER_PATH "pygrub" =20 =20 typedef struct _libxlDriverPrivate libxlDriverPrivate; @@ -141,12 +140,12 @@ struct _libxlDriverPrivate { virLockManagerPluginPtr lockManager; }; =20 -# define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r" -# ifdef LIBXL_HAVE_SRM_V2 -# define LIBXL_SAVE_VERSION 2 -# else -# define LIBXL_SAVE_VERSION 1 -# endif +#define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r" +#ifdef LIBXL_HAVE_SRM_V2 +# define LIBXL_SAVE_VERSION 2 +#else +# define LIBXL_SAVE_VERSION 1 +#endif =20 typedef struct _libxlSavefileHeader libxlSavefileHeader; typedef libxlSavefileHeader *libxlSavefileHeaderPtr; @@ -193,23 +192,23 @@ libxlMakeVfb(virPortAllocatorRangePtr graphicsports, int libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev); =20 -# ifdef LIBXL_HAVE_PVUSB +#ifdef LIBXL_HAVE_PVUSB int libxlMakeUSBController(virDomainControllerDefPtr controller, libxl_device_usbctrl *usbctrl); =20 int libxlMakeUSB(virDomainHostdevDefPtr hostdev, libxl_device_usbdev *usbdev); -# endif +#endif =20 virDomainXMLOptionPtr libxlCreateXMLConf(void); =20 -# ifdef LIBXL_HAVE_DEVICE_CHANNEL -# define LIBXL_ATTR_UNUSED -# else -# define LIBXL_ATTR_UNUSED ATTRIBUTE_UNUSED -# endif +#ifdef LIBXL_HAVE_DEVICE_CHANNEL +# define LIBXL_ATTR_UNUSED +#else +# define LIBXL_ATTR_UNUSED ATTRIBUTE_UNUSED +#endif int libxlBuildDomainConfig(virPortAllocatorRangePtr graphicsports, virDomainDefPtr def, @@ -227,5 +226,3 @@ libxlDriverUnlock(libxlDriverPrivatePtr driver) { virMutexUnlock(&driver->lock); } - -#endif /* LIBVIRT_LIBXL_CONF_H */ diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h index 769ee8ec4d..737ae6accd 100644 --- a/src/libxl/libxl_domain.h +++ b/src/libxl/libxl_domain.h @@ -18,18 +18,17 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_DOMAIN_H -# define LIBVIRT_LIBXL_DOMAIN_H +#pragma once =20 -# include +#include =20 -# include "domain_conf.h" -# include "libxl_conf.h" -# include "virchrdev.h" -# include "virenum.h" +#include "domain_conf.h" +#include "libxl_conf.h" +#include "virchrdev.h" +#include "virenum.h" =20 -# define JOB_MASK(job) (job =3D=3D 0 ? 0 : 1 << (job - 1)) -# define DEFAULT_JOB_MASK \ +#define JOB_MASK(job) (job =3D=3D 0 ? 0 : 1 << (job - 1)) +#define DEFAULT_JOB_MASK \ (JOB_MASK(LIBXL_JOB_DESTROY) | \ JOB_MASK(LIBXL_JOB_ABORT)) =20 @@ -122,11 +121,11 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver, * Detect which signature to use based on * LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG. */ -# ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG -# define VIR_LIBXL_EVENT_CONST /* empty */ -# else -# define VIR_LIBXL_EVENT_CONST const -# endif +#ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG +# define VIR_LIBXL_EVENT_CONST /* empty */ +#else +# define VIR_LIBXL_EVENT_CONST const +#endif =20 void libxlDomainEventHandler(void *data, @@ -156,5 +155,3 @@ bool libxlDomainDefCheckABIStability(libxlDriverPrivatePtr driver, virDomainDefPtr src, virDomainDefPtr dst); - -#endif /* LIBVIRT_LIBXL_DOMAIN_H */ diff --git a/src/libxl/libxl_driver.h b/src/libxl/libxl_driver.h index 23b3ed2910..4fbcd377e6 100644 --- a/src/libxl/libxl_driver.h +++ b/src/libxl/libxl_driver.h @@ -18,9 +18,6 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_DRIVER_H -# define LIBVIRT_LIBXL_DRIVER_H +#pragma once =20 int libxlRegister(void); - -#endif /* LIBVIRT_LIBXL_DRIVER_H */ diff --git a/src/libxl/libxl_logger.h b/src/libxl/libxl_logger.h index 678009eba8..a09c6496f3 100644 --- a/src/libxl/libxl_logger.h +++ b/src/libxl/libxl_logger.h @@ -18,10 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_LOGGER_H -# define LIBVIRT_LIBXL_LOGGER_H +#pragma once =20 -# include "util/virlog.h" +#include "util/virlog.h" =20 typedef struct xentoollog_logger_libvirt libxlLogger; typedef libxlLogger *libxlLoggerPtr; @@ -33,5 +32,3 @@ void libxlLoggerFree(libxlLoggerPtr logger); void libxlLoggerOpenFile(libxlLoggerPtr logger, int id, const char *name, const char *domain_config); void libxlLoggerCloseFile(libxlLoggerPtr logger, int id); - -#endif /* LIBVIRT_LIBXL_LOGGER_H */ diff --git a/src/libxl/libxl_migration.h b/src/libxl/libxl_migration.h index 5aea16b741..b733d21cd2 100644 --- a/src/libxl/libxl_migration.h +++ b/src/libxl/libxl_migration.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_LIBXL_MIGRATION_H -# define LIBVIRT_LIBXL_MIGRATION_H +#pragma once =20 -# include "libxl_conf.h" +#include "libxl_conf.h" =20 -# define LIBXL_MIGRATION_FLAGS \ +#define LIBXL_MIGRATION_FLAGS \ (VIR_MIGRATE_LIVE | \ VIR_MIGRATE_PEER2PEER | \ VIR_MIGRATE_TUNNELLED | \ @@ -32,7 +31,7 @@ VIR_MIGRATE_PAUSED) =20 /* All supported migration parameters and their types. */ -# define LIBXL_MIGRATION_PARAMETERS \ +#define LIBXL_MIGRATION_PARAMETERS \ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \ @@ -97,5 +96,3 @@ libxlDomainMigrationSrcConfirm(libxlDriverPrivatePtr driv= er, virDomainObjPtr vm, unsigned int flags, int cancelled); - -#endif /* LIBVIRT_LIBXL_MIGRATION_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 11:18:28 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938989; cv=none; d=zoho.com; s=zohoarc; b=Qt9t++PkRRKZ+8eA0FbElPqW/zijpKYXaqJUWV7HqxSE2Wv5mtUlAbNTx08ztye0AKfximFNzzNlGlEm4yx+2QfxG2UZqNXFwR3cWjIMjGQsOXbPUo38ZizUtgXtKXgUBST9K4k6+yBe8XnHexy+l4CI95hgmPwEcloaSmMqz+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938989; 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:ARC-Authentication-Results; bh=6DNBlrUtf7YZg6+I4cIzYz8Yt2aJsBaNBr9d04LK9xM=; b=QIXVdiP3ACaSpUHSE6GeOJEpSbKsJ9y3pMAcW2YFkZ1k64Av1UPUY5hwC+YwvbkVi7Ox5zXjCUw3v3KJ9o11oEQ6xJ1fQpmFJqELqrqTdDBpqxOhRQJ0gFJqERkq3zF6DsAtgvrot2YEEsroblAtzzMHXvOu48GGhGqg4er2GzA= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938989303615.9337972961181; Fri, 7 Jun 2019 13:23:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9E98C1EB1F8; Fri, 7 Jun 2019 20:23:02 +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 8D04919C79; Fri, 7 Jun 2019 20:23:01 +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 4FADF206DF; Fri, 7 Jun 2019 20:23:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKiEW025798 for ; Fri, 7 Jun 2019 16:20:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0391B5C205; Fri, 7 Jun 2019 20:20:44 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C60BE5C206 for ; Fri, 7 Jun 2019 20:20:43 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:30 -0500 Message-Id: <20190607202030.29625-20-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 19/19] src/logging: use #pragma once in headers 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 07 Jun 2019 20:23:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/logging/log_daemon.h | 9 +++------ src/logging/log_daemon_config.h | 7 ++----- src/logging/log_daemon_dispatch.h | 7 ++----- src/logging/log_handler.h | 9 +++------ src/logging/log_manager.h | 9 +++------ 5 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/logging/log_daemon.h b/src/logging/log_daemon.h index 27f6af72cf..fa661e1793 100644 --- a/src/logging/log_daemon.h +++ b/src/logging/log_daemon.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_LOG_DAEMON_H -# define LIBVIRT_LOG_DAEMON_H +#pragma once =20 -# include "virthread.h" -# include "log_handler.h" +#include "virthread.h" +#include "log_handler.h" =20 typedef struct _virLogDaemon virLogDaemon; typedef virLogDaemon *virLogDaemonPtr; @@ -39,5 +38,3 @@ struct _virLogDaemonClient { extern virLogDaemonPtr logDaemon; =20 virLogHandlerPtr virLogDaemonGetHandler(virLogDaemonPtr dmn); - -#endif /* LIBVIRT_LOG_DAEMON_H */ diff --git a/src/logging/log_daemon_config.h b/src/logging/log_daemon_confi= g.h index 2508e4c918..957c20c893 100644 --- a/src/logging/log_daemon_config.h +++ b/src/logging/log_daemon_config.h @@ -19,10 +19,9 @@ * . */ =20 -#ifndef LIBVIRT_LOG_DAEMON_CONFIG_H -# define LIBVIRT_LOG_DAEMON_CONFIG_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 typedef struct _virLogDaemonConfig virLogDaemonConfig; typedef virLogDaemonConfig *virLogDaemonConfigPtr; @@ -45,5 +44,3 @@ void virLogDaemonConfigFree(virLogDaemonConfigPtr data); int virLogDaemonConfigLoadFile(virLogDaemonConfigPtr data, const char *filename, bool allow_missing); - -#endif /* LIBVIRT_LOG_DAEMON_CONFIG_H */ diff --git a/src/logging/log_daemon_dispatch.h b/src/logging/log_daemon_dis= patch.h index 8471d6798f..7738f62c70 100644 --- a/src/logging/log_daemon_dispatch.h +++ b/src/logging/log_daemon_dispatch.h @@ -18,12 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_LOG_DAEMON_DISPATCH_H -# define LIBVIRT_LOG_DAEMON_DISPATCH_H +#pragma once =20 -# include "rpc/virnetserverprogram.h" +#include "rpc/virnetserverprogram.h" =20 extern virNetServerProgramProc virLogManagerProtocolProcs[]; extern size_t virLogManagerProtocolNProcs; - -#endif /* LIBVIRT_LOG_DAEMON_DISPATCH_H */ diff --git a/src/logging/log_handler.h b/src/logging/log_handler.h index db202f7091..8c8562e0c5 100644 --- a/src/logging/log_handler.h +++ b/src/logging/log_handler.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_LOG_HANDLER_H -# define LIBVIRT_LOG_HANDLER_H +#pragma once =20 -# include "internal.h" -# include "virjson.h" +#include "internal.h" +#include "virjson.h" =20 typedef struct _virLogHandler virLogHandler; typedef virLogHandler *virLogHandlerPtr; @@ -76,5 +75,3 @@ int virLogHandlerDomainAppendLogFile(virLogHandlerPtr han= dler, unsigned int flags); =20 virJSONValuePtr virLogHandlerPreExecRestart(virLogHandlerPtr handler); - -#endif /* LIBVIRT_LOG_HANDLER_H */ diff --git a/src/logging/log_manager.h b/src/logging/log_manager.h index d796971ef8..cca1573841 100644 --- a/src/logging/log_manager.h +++ b/src/logging/log_manager.h @@ -18,12 +18,11 @@ * . */ =20 -#ifndef LIBVIRT_LOG_MANAGER_H -# define LIBVIRT_LOG_MANAGER_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "logging/log_protocol.h" +#include "logging/log_protocol.h" =20 typedef struct _virLogManager virLogManager; typedef virLogManager *virLogManagerPtr; @@ -61,5 +60,3 @@ int virLogManagerDomainAppendMessage(virLogManagerPtr mgr, const char *path, const char *message, unsigned int flags); - -#endif /* LIBVIRT_LOG_MANAGER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list