src/locking: use #pragma once in headers

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:12:31 -05:00 committed by Ján Tomko
parent c0dc0e8e23
commit 91d16fdba0
8 changed files with 24 additions and 50 deletions

View File

@ -19,12 +19,11 @@
* *
*/ */
#ifndef LIBVIRT_DOMAIN_LOCK_H #pragma once
# define LIBVIRT_DOMAIN_LOCK_H
# include "internal.h" #include "internal.h"
# include "domain_conf.h" #include "domain_conf.h"
# include "lock_manager.h" #include "lock_manager.h"
int virDomainLockProcessStart(virLockManagerPluginPtr plugin, int virDomainLockProcessStart(virLockManagerPluginPtr plugin,
const char *uri, const char *uri,
@ -57,5 +56,3 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin, int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
virDomainObjPtr dom, virDomainObjPtr dom,
virDomainLeaseDefPtr lease); virDomainLeaseDefPtr lease);
#endif /* LIBVIRT_DOMAIN_LOCK_H */

View File

@ -18,11 +18,10 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_LOCK_DAEMON_H #pragma once
# define LIBVIRT_LOCK_DAEMON_H
# include "virlockspace.h" #include "virlockspace.h"
# include "virthread.h" #include "virthread.h"
typedef struct _virLockDaemon virLockDaemon; typedef struct _virLockDaemon virLockDaemon;
typedef virLockDaemon *virLockDaemonPtr; typedef virLockDaemon *virLockDaemonPtr;
@ -50,5 +49,3 @@ int virLockDaemonAddLockSpace(virLockDaemonPtr lockd,
virLockSpacePtr virLockDaemonFindLockSpace(virLockDaemonPtr lockd, virLockSpacePtr virLockDaemonFindLockSpace(virLockDaemonPtr lockd,
const char *path); const char *path);
#endif /* LIBVIRT_LOCK_DAEMON_H */

View File

@ -19,10 +19,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_LOCK_DAEMON_CONFIG_H #pragma once
# define LIBVIRT_LOCK_DAEMON_CONFIG_H
# include "internal.h" #include "internal.h"
typedef struct _virLockDaemonConfig virLockDaemonConfig; typedef struct _virLockDaemonConfig virLockDaemonConfig;
typedef virLockDaemonConfig *virLockDaemonConfigPtr; typedef virLockDaemonConfig *virLockDaemonConfigPtr;
@ -42,5 +41,3 @@ void virLockDaemonConfigFree(virLockDaemonConfigPtr data);
int virLockDaemonConfigLoadFile(virLockDaemonConfigPtr data, int virLockDaemonConfigLoadFile(virLockDaemonConfigPtr data,
const char *filename, const char *filename,
bool allow_missing); bool allow_missing);
#endif /* LIBVIRT_LOCK_DAEMON_CONFIG_H */

View File

@ -18,12 +18,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_LOCK_DAEMON_DISPATCH_H #pragma once
# define LIBVIRT_LOCK_DAEMON_DISPATCH_H
# include "rpc/virnetserverprogram.h" #include "rpc/virnetserverprogram.h"
extern virNetServerProgramProc virLockSpaceProtocolProcs[]; extern virNetServerProgramProc virLockSpaceProtocolProcs[];
extern size_t virLockSpaceProtocolNProcs; extern size_t virLockSpaceProtocolNProcs;
#endif /* LIBVIRT_LOCK_DAEMON_DISPATCH_H */

View File

@ -19,11 +19,10 @@
* *
*/ */
#ifndef LIBVIRT_LOCK_DRIVER_H #pragma once
# define LIBVIRT_LOCK_DRIVER_H
# include "internal.h" #include "internal.h"
# include "domain_conf.h" #include "domain_conf.h"
typedef struct _virLockManager virLockManager; typedef struct _virLockManager virLockManager;
typedef virLockManager *virLockManagerPtr; typedef virLockManager *virLockManagerPtr;
@ -102,11 +101,11 @@ struct _virLockManagerParam {
* Changes in minor version denote new compatible API entry points * Changes in minor version denote new compatible API entry points
* Changes in micro version denote new compatible flags * Changes in micro version denote new compatible flags
*/ */
# define VIR_LOCK_MANAGER_VERSION_MAJOR 1 #define VIR_LOCK_MANAGER_VERSION_MAJOR 1
# define VIR_LOCK_MANAGER_VERSION_MINOR 0 #define VIR_LOCK_MANAGER_VERSION_MINOR 0
# define VIR_LOCK_MANAGER_VERSION_MICRO 0 #define VIR_LOCK_MANAGER_VERSION_MICRO 0
# define VIR_LOCK_MANAGER_VERSION \ #define VIR_LOCK_MANAGER_VERSION \
((VIR_LOCK_MANAGER_VERSION_MAJOR * 1000 * 1000) + \ ((VIR_LOCK_MANAGER_VERSION_MAJOR * 1000 * 1000) + \
(VIR_LOCK_MANAGER_VERSION_MINOR * 1000) + \ (VIR_LOCK_MANAGER_VERSION_MINOR * 1000) + \
(VIR_LOCK_MANAGER_VERSION_MICRO)) (VIR_LOCK_MANAGER_VERSION_MICRO))
@ -314,6 +313,3 @@ struct _virLockDriver {
virLockDriverRelease drvRelease; virLockDriverRelease drvRelease;
virLockDriverInquire drvInquire; virLockDriverInquire drvInquire;
}; };
#endif /* LIBVIRT_LOCK_DRIVER_H */

View File

@ -19,12 +19,9 @@
* *
*/ */
#ifndef LIBVIRT_LOCK_DRIVER_LOCKD_H #pragma once
# define LIBVIRT_LOCK_DRIVER_LOCKD_H
enum virLockSpaceProtocolAcquireResourceFlags { enum virLockSpaceProtocolAcquireResourceFlags {
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0), VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1), VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
}; };
#endif /* LIBVIRT_LOCK_DRIVER_LOCKD_H */

View File

@ -19,12 +19,8 @@
* *
*/ */
#ifndef LIBVIRT_LOCK_DRIVER_NOP_H #pragma once
# define LIBVIRT_LOCK_DRIVER_NOP_H
# include "lock_driver.h" #include "lock_driver.h"
extern virLockDriver virLockDriverNop; extern virLockDriver virLockDriverNop;
#endif /* LIBVIRT_LOCK_DRIVER_NOP_H */

View File

@ -19,11 +19,10 @@
* *
*/ */
#ifndef LIBVIRT_LOCK_MANAGER_H #pragma once
# define LIBVIRT_LOCK_MANAGER_H
# include "internal.h" #include "internal.h"
# include "lock_driver.h" #include "lock_driver.h"
typedef struct _virLockManagerPlugin virLockManagerPlugin; typedef struct _virLockManagerPlugin virLockManagerPlugin;
typedef virLockManagerPlugin *virLockManagerPluginPtr; typedef virLockManagerPlugin *virLockManagerPluginPtr;
@ -66,5 +65,3 @@ int virLockManagerInquire(virLockManagerPtr manager,
unsigned int flags); unsigned int flags);
int virLockManagerFree(virLockManagerPtr manager); int virLockManagerFree(virLockManagerPtr manager);
#endif /* LIBVIRT_LOCK_MANAGER_H */