From nobody Mon Feb 9 21:36:52 2026 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=1560876061; cv=none; d=zoho.com; s=zohoarc; b=DZ/ksrIMowycb27aNOyZZltxvGHwOpeqjj3rZVSE5c6vBAmHVEs+fHX9j2Rm3fyWKUGA2rFceCZXeNGNBubqbfxlt1sU8NriMQpS9Hdho+3OGDDQPB7wgWMNUoSPL5OIDOsKMYlAlTgSLNTkuTxZfrGeYOgoYXlNw2oCDl+t4lQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560876061; 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=zCdkAzh4ba59eobWAWpgdoq3rpRVK6Nw6dR575oEgEo=; b=Dnqx7hSjA2ItFOwYXvtsmjxiUAIl9srp/CQ4mEACtmHupCe8VZWZkgfu8LsG3H84r25oXyZ9KzV74VRQFMusfUWqdulT1G/jCnApjAPlUcbrnG6lRTgDoZtbpIdsaxWYH0tQ/oZiJy7uhMCPWkYTSwmCEJpUyoipndksGSMmT7Q= 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 1560876061795543.9435053692023; Tue, 18 Jun 2019 09:41:01 -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 6B4A63092665; Tue, 18 Jun 2019 16:40:51 +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 435021001E65; Tue, 18 Jun 2019 16:40:48 +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 F252C1806B18; Tue, 18 Jun 2019 16:40:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5IGDOOo024116 for ; Tue, 18 Jun 2019 12:13:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 573DB84EF; Tue, 18 Jun 2019 16:13:24 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-198.phx2.redhat.com [10.3.117.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 243A360FAB for ; Tue, 18 Jun 2019 16:13:24 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Tue, 18 Jun 2019 11:12:31 -0500 Message-Id: <20190618161316.1722-2-jjongsma@redhat.com> In-Reply-To: <20190618161316.1722-1-jjongsma@redhat.com> References: <20190618161316.1722-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/46] src/locking: 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.43]); Tue, 18 Jun 2019 16:41:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/locking/domain_lock.h | 11 ++++------- src/locking/lock_daemon.h | 9 +++------ src/locking/lock_daemon_config.h | 7 ++----- src/locking/lock_daemon_dispatch.h | 7 ++----- src/locking/lock_driver.h | 18 +++++++----------- src/locking/lock_driver_lockd.h | 5 +---- src/locking/lock_driver_nop.h | 8 ++------ src/locking/lock_manager.h | 9 +++------ 8 files changed, 24 insertions(+), 50 deletions(-) diff --git a/src/locking/domain_lock.h b/src/locking/domain_lock.h index 02417b471b..6f197bf08b 100644 --- a/src/locking/domain_lock.h +++ b/src/locking/domain_lock.h @@ -19,12 +19,11 @@ * */ =20 -#ifndef LIBVIRT_DOMAIN_LOCK_H -# define LIBVIRT_DOMAIN_LOCK_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" -# include "lock_manager.h" +#include "internal.h" +#include "domain_conf.h" +#include "lock_manager.h" =20 int virDomainLockProcessStart(virLockManagerPluginPtr plugin, const char *uri, @@ -57,5 +56,3 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plug= in, int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin, virDomainObjPtr dom, virDomainLeaseDefPtr lease); - -#endif /* LIBVIRT_DOMAIN_LOCK_H */ diff --git a/src/locking/lock_daemon.h b/src/locking/lock_daemon.h index 5c7f976ea4..7d30551c32 100644 --- a/src/locking/lock_daemon.h +++ b/src/locking/lock_daemon.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_LOCK_DAEMON_H -# define LIBVIRT_LOCK_DAEMON_H +#pragma once =20 -# include "virlockspace.h" -# include "virthread.h" +#include "virlockspace.h" +#include "virthread.h" =20 typedef struct _virLockDaemon virLockDaemon; typedef virLockDaemon *virLockDaemonPtr; @@ -50,5 +49,3 @@ int virLockDaemonAddLockSpace(virLockDaemonPtr lockd, =20 virLockSpacePtr virLockDaemonFindLockSpace(virLockDaemonPtr lockd, const char *path); - -#endif /* LIBVIRT_LOCK_DAEMON_H */ diff --git a/src/locking/lock_daemon_config.h b/src/locking/lock_daemon_con= fig.h index e820d60268..0f47ab1ed0 100644 --- a/src/locking/lock_daemon_config.h +++ b/src/locking/lock_daemon_config.h @@ -19,10 +19,9 @@ * . */ =20 -#ifndef LIBVIRT_LOCK_DAEMON_CONFIG_H -# define LIBVIRT_LOCK_DAEMON_CONFIG_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 typedef struct _virLockDaemonConfig virLockDaemonConfig; typedef virLockDaemonConfig *virLockDaemonConfigPtr; @@ -42,5 +41,3 @@ void virLockDaemonConfigFree(virLockDaemonConfigPtr data); int virLockDaemonConfigLoadFile(virLockDaemonConfigPtr data, const char *filename, bool allow_missing); - -#endif /* LIBVIRT_LOCK_DAEMON_CONFIG_H */ diff --git a/src/locking/lock_daemon_dispatch.h b/src/locking/lock_daemon_d= ispatch.h index 568a7e0160..d269ba10a8 100644 --- a/src/locking/lock_daemon_dispatch.h +++ b/src/locking/lock_daemon_dispatch.h @@ -18,12 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_LOCK_DAEMON_DISPATCH_H -# define LIBVIRT_LOCK_DAEMON_DISPATCH_H +#pragma once =20 -# include "rpc/virnetserverprogram.h" +#include "rpc/virnetserverprogram.h" =20 extern virNetServerProgramProc virLockSpaceProtocolProcs[]; extern size_t virLockSpaceProtocolNProcs; - -#endif /* LIBVIRT_LOCK_DAEMON_DISPATCH_H */ diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h index 50c73a70d4..e53c28ee33 100644 --- a/src/locking/lock_driver.h +++ b/src/locking/lock_driver.h @@ -19,11 +19,10 @@ * */ =20 -#ifndef LIBVIRT_LOCK_DRIVER_H -# define LIBVIRT_LOCK_DRIVER_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" +#include "internal.h" +#include "domain_conf.h" =20 typedef struct _virLockManager virLockManager; typedef virLockManager *virLockManagerPtr; @@ -102,11 +101,11 @@ struct _virLockManagerParam { * Changes in minor version denote new compatible API entry points * Changes in micro version denote new compatible flags */ -# define VIR_LOCK_MANAGER_VERSION_MAJOR 1 -# define VIR_LOCK_MANAGER_VERSION_MINOR 0 -# define VIR_LOCK_MANAGER_VERSION_MICRO 0 +#define VIR_LOCK_MANAGER_VERSION_MAJOR 1 +#define VIR_LOCK_MANAGER_VERSION_MINOR 0 +#define VIR_LOCK_MANAGER_VERSION_MICRO 0 =20 -# define VIR_LOCK_MANAGER_VERSION \ +#define VIR_LOCK_MANAGER_VERSION \ ((VIR_LOCK_MANAGER_VERSION_MAJOR * 1000 * 1000) + \ (VIR_LOCK_MANAGER_VERSION_MINOR * 1000) + \ (VIR_LOCK_MANAGER_VERSION_MICRO)) @@ -314,6 +313,3 @@ struct _virLockDriver { virLockDriverRelease drvRelease; virLockDriverInquire drvInquire; }; - - -#endif /* LIBVIRT_LOCK_DRIVER_H */ diff --git a/src/locking/lock_driver_lockd.h b/src/locking/lock_driver_lock= d.h index d79d5e738a..b9eaab4831 100644 --- a/src/locking/lock_driver_lockd.h +++ b/src/locking/lock_driver_lockd.h @@ -19,12 +19,9 @@ * */ =20 -#ifndef LIBVIRT_LOCK_DRIVER_LOCKD_H -# define LIBVIRT_LOCK_DRIVER_LOCKD_H +#pragma once =20 enum virLockSpaceProtocolAcquireResourceFlags { VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED =3D (1 << 0), VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE =3D (1 << 1), }; - -#endif /* LIBVIRT_LOCK_DRIVER_LOCKD_H */ diff --git a/src/locking/lock_driver_nop.h b/src/locking/lock_driver_nop.h index 2443072e3d..e2525e0bd1 100644 --- a/src/locking/lock_driver_nop.h +++ b/src/locking/lock_driver_nop.h @@ -19,12 +19,8 @@ * */ =20 -#ifndef LIBVIRT_LOCK_DRIVER_NOP_H -# define LIBVIRT_LOCK_DRIVER_NOP_H +#pragma once =20 -# include "lock_driver.h" +#include "lock_driver.h" =20 extern virLockDriver virLockDriverNop; - - -#endif /* LIBVIRT_LOCK_DRIVER_NOP_H */ diff --git a/src/locking/lock_manager.h b/src/locking/lock_manager.h index 71d3909709..4a19f58879 100644 --- a/src/locking/lock_manager.h +++ b/src/locking/lock_manager.h @@ -19,11 +19,10 @@ * */ =20 -#ifndef LIBVIRT_LOCK_MANAGER_H -# define LIBVIRT_LOCK_MANAGER_H +#pragma once =20 -# include "internal.h" -# include "lock_driver.h" +#include "internal.h" +#include "lock_driver.h" =20 typedef struct _virLockManagerPlugin virLockManagerPlugin; typedef virLockManagerPlugin *virLockManagerPluginPtr; @@ -66,5 +65,3 @@ int virLockManagerInquire(virLockManagerPtr manager, unsigned int flags); =20 int virLockManagerFree(virLockManagerPtr manager); - -#endif /* LIBVIRT_LOCK_MANAGER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list