From nobody Fri Dec 19 20:34:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com 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 --- 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