提交 91d16fdb 编写于 作者: J Jonathon Jongsma 提交者: Ján Tomko

src/locking: use #pragma once in headers

Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 c0dc0e8e
...@@ -19,12 +19,11 @@ ...@@ -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, ...@@ -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 */
...@@ -18,11 +18,10 @@ ...@@ -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, ...@@ -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 */
...@@ -19,10 +19,9 @@ ...@@ -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); ...@@ -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 */
...@@ -18,12 +18,9 @@ ...@@ -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 */
...@@ -19,11 +19,10 @@ ...@@ -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 { ...@@ -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 { ...@@ -314,6 +313,3 @@ struct _virLockDriver {
virLockDriverRelease drvRelease; virLockDriverRelease drvRelease;
virLockDriverInquire drvInquire; virLockDriverInquire drvInquire;
}; };
#endif /* LIBVIRT_LOCK_DRIVER_H */
...@@ -19,12 +19,9 @@ ...@@ -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 */
...@@ -19,12 +19,8 @@ ...@@ -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 */
...@@ -19,11 +19,10 @@ ...@@ -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, ...@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册