mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
c0dc0e8e23
commit
91d16fdba0
|
@ -19,12 +19,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_DOMAIN_LOCK_H
|
||||
# define LIBVIRT_DOMAIN_LOCK_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
# include "domain_conf.h"
|
||||
# include "lock_manager.h"
|
||||
#include "internal.h"
|
||||
#include "domain_conf.h"
|
||||
#include "lock_manager.h"
|
||||
|
||||
int virDomainLockProcessStart(virLockManagerPluginPtr plugin,
|
||||
const char *uri,
|
||||
|
@ -57,5 +56,3 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
|
|||
int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
|
||||
virDomainObjPtr dom,
|
||||
virDomainLeaseDefPtr lease);
|
||||
|
||||
#endif /* LIBVIRT_DOMAIN_LOCK_H */
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DAEMON_H
|
||||
# define LIBVIRT_LOCK_DAEMON_H
|
||||
#pragma once
|
||||
|
||||
# include "virlockspace.h"
|
||||
# include "virthread.h"
|
||||
#include "virlockspace.h"
|
||||
#include "virthread.h"
|
||||
|
||||
typedef struct _virLockDaemon virLockDaemon;
|
||||
typedef virLockDaemon *virLockDaemonPtr;
|
||||
|
@ -50,5 +49,3 @@ int virLockDaemonAddLockSpace(virLockDaemonPtr lockd,
|
|||
|
||||
virLockSpacePtr virLockDaemonFindLockSpace(virLockDaemonPtr lockd,
|
||||
const char *path);
|
||||
|
||||
#endif /* LIBVIRT_LOCK_DAEMON_H */
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DAEMON_CONFIG_H
|
||||
# define LIBVIRT_LOCK_DAEMON_CONFIG_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
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 */
|
||||
|
|
|
@ -18,12 +18,9 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DAEMON_DISPATCH_H
|
||||
# define LIBVIRT_LOCK_DAEMON_DISPATCH_H
|
||||
#pragma once
|
||||
|
||||
# include "rpc/virnetserverprogram.h"
|
||||
#include "rpc/virnetserverprogram.h"
|
||||
|
||||
extern virNetServerProgramProc virLockSpaceProtocolProcs[];
|
||||
extern size_t virLockSpaceProtocolNProcs;
|
||||
|
||||
#endif /* LIBVIRT_LOCK_DAEMON_DISPATCH_H */
|
||||
|
|
|
@ -19,11 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DRIVER_H
|
||||
# define LIBVIRT_LOCK_DRIVER_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
# include "domain_conf.h"
|
||||
#include "internal.h"
|
||||
#include "domain_conf.h"
|
||||
|
||||
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
|
||||
|
||||
# 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 */
|
||||
|
|
|
@ -19,12 +19,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DRIVER_LOCKD_H
|
||||
# define LIBVIRT_LOCK_DRIVER_LOCKD_H
|
||||
#pragma once
|
||||
|
||||
enum virLockSpaceProtocolAcquireResourceFlags {
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
|
||||
};
|
||||
|
||||
#endif /* LIBVIRT_LOCK_DRIVER_LOCKD_H */
|
||||
|
|
|
@ -19,12 +19,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_DRIVER_NOP_H
|
||||
# define LIBVIRT_LOCK_DRIVER_NOP_H
|
||||
#pragma once
|
||||
|
||||
# include "lock_driver.h"
|
||||
#include "lock_driver.h"
|
||||
|
||||
extern virLockDriver virLockDriverNop;
|
||||
|
||||
|
||||
#endif /* LIBVIRT_LOCK_DRIVER_NOP_H */
|
||||
|
|
|
@ -19,11 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LOCK_MANAGER_H
|
||||
# define LIBVIRT_LOCK_MANAGER_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
# include "lock_driver.h"
|
||||
#include "internal.h"
|
||||
#include "lock_driver.h"
|
||||
|
||||
typedef struct _virLockManagerPlugin virLockManagerPlugin;
|
||||
typedef virLockManagerPlugin *virLockManagerPluginPtr;
|
||||
|
@ -66,5 +65,3 @@ int virLockManagerInquire(virLockManagerPtr manager,
|
|||
unsigned int flags);
|
||||
|
||||
int virLockManagerFree(virLockManagerPtr manager);
|
||||
|
||||
#endif /* LIBVIRT_LOCK_MANAGER_H */
|
||||
|
|
Loading…
Reference in New Issue