mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
src/libxl: 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
9d239be524
commit
250721afbb
@ -18,27 +18,26 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_CAPABILITIES_H
|
||||
# define LIBVIRT_LIBXL_CAPABILITIES_H
|
||||
#pragma once
|
||||
|
||||
# include <libxl.h>
|
||||
#include <libxl.h>
|
||||
|
||||
# include "virobject.h"
|
||||
# include "capabilities.h"
|
||||
# include "domain_capabilities.h"
|
||||
# include "virfirmware.h"
|
||||
#include "virobject.h"
|
||||
#include "capabilities.h"
|
||||
#include "domain_capabilities.h"
|
||||
#include "virfirmware.h"
|
||||
|
||||
|
||||
# ifndef LIBXL_FIRMWARE_DIR
|
||||
# define LIBXL_FIRMWARE_DIR "/usr/lib/xen/boot"
|
||||
# endif
|
||||
# ifndef LIBXL_EXECBIN_DIR
|
||||
# define LIBXL_EXECBIN_DIR "/usr/lib/xen/bin"
|
||||
# endif
|
||||
#ifndef LIBXL_FIRMWARE_DIR
|
||||
# define LIBXL_FIRMWARE_DIR "/usr/lib/xen/boot"
|
||||
#endif
|
||||
#ifndef LIBXL_EXECBIN_DIR
|
||||
# define LIBXL_EXECBIN_DIR "/usr/lib/xen/bin"
|
||||
#endif
|
||||
|
||||
/* Used for prefix of ifname of any network name generated dynamically
|
||||
* by libvirt for Xen, and cannot be used for a persistent network name. */
|
||||
# define LIBXL_GENERATED_PREFIX_XEN "vif"
|
||||
#define LIBXL_GENERATED_PREFIX_XEN "vif"
|
||||
|
||||
bool libxlCapsHasPVUSB(void);
|
||||
|
||||
@ -52,5 +51,3 @@ libxlMakeDomainCapabilities(virDomainCapsPtr domCaps,
|
||||
|
||||
int
|
||||
libxlDomainGetEmulatorType(const virDomainDef *def);
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_CAPABILITIES_H */
|
||||
|
@ -19,43 +19,42 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_CONF_H
|
||||
# define LIBVIRT_LIBXL_CONF_H
|
||||
#pragma once
|
||||
|
||||
# include <libxl.h>
|
||||
#include <libxl.h>
|
||||
|
||||
# include "internal.h"
|
||||
# include "libvirt_internal.h"
|
||||
# include "virdomainobjlist.h"
|
||||
# include "domain_event.h"
|
||||
# include "capabilities.h"
|
||||
# include "configmake.h"
|
||||
# include "virportallocator.h"
|
||||
# include "virobject.h"
|
||||
# include "virchrdev.h"
|
||||
# include "virhostdev.h"
|
||||
# include "locking/lock_manager.h"
|
||||
# include "virfirmware.h"
|
||||
# include "libxl_capabilities.h"
|
||||
# include "libxl_logger.h"
|
||||
#include "internal.h"
|
||||
#include "libvirt_internal.h"
|
||||
#include "virdomainobjlist.h"
|
||||
#include "domain_event.h"
|
||||
#include "capabilities.h"
|
||||
#include "configmake.h"
|
||||
#include "virportallocator.h"
|
||||
#include "virobject.h"
|
||||
#include "virchrdev.h"
|
||||
#include "virhostdev.h"
|
||||
#include "locking/lock_manager.h"
|
||||
#include "virfirmware.h"
|
||||
#include "libxl_capabilities.h"
|
||||
#include "libxl_logger.h"
|
||||
|
||||
# define LIBXL_DRIVER_NAME "xenlight"
|
||||
# define LIBXL_VNC_PORT_MIN 5900
|
||||
# define LIBXL_VNC_PORT_MAX 65535
|
||||
#define LIBXL_DRIVER_NAME "xenlight"
|
||||
#define LIBXL_VNC_PORT_MIN 5900
|
||||
#define LIBXL_VNC_PORT_MAX 65535
|
||||
|
||||
# define LIBXL_MIGRATION_PORT_MIN 49152
|
||||
# define LIBXL_MIGRATION_PORT_MAX 49216
|
||||
#define LIBXL_MIGRATION_PORT_MIN 49152
|
||||
#define LIBXL_MIGRATION_PORT_MAX 49216
|
||||
|
||||
# define LIBXL_CONFIG_BASE_DIR SYSCONFDIR "/libvirt"
|
||||
# define LIBXL_CONFIG_DIR SYSCONFDIR "/libvirt/libxl"
|
||||
# define LIBXL_AUTOSTART_DIR LIBXL_CONFIG_DIR "/autostart"
|
||||
# define LIBXL_STATE_DIR LOCALSTATEDIR "/run/libvirt/libxl"
|
||||
# define LIBXL_LOG_DIR LOCALSTATEDIR "/log/libvirt/libxl"
|
||||
# define LIBXL_LIB_DIR LOCALSTATEDIR "/lib/libvirt/libxl"
|
||||
# define LIBXL_SAVE_DIR LIBXL_LIB_DIR "/save"
|
||||
# define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
|
||||
# define LIBXL_CHANNEL_DIR LIBXL_LIB_DIR "/channel/target"
|
||||
# define LIBXL_BOOTLOADER_PATH "pygrub"
|
||||
#define LIBXL_CONFIG_BASE_DIR SYSCONFDIR "/libvirt"
|
||||
#define LIBXL_CONFIG_DIR SYSCONFDIR "/libvirt/libxl"
|
||||
#define LIBXL_AUTOSTART_DIR LIBXL_CONFIG_DIR "/autostart"
|
||||
#define LIBXL_STATE_DIR LOCALSTATEDIR "/run/libvirt/libxl"
|
||||
#define LIBXL_LOG_DIR LOCALSTATEDIR "/log/libvirt/libxl"
|
||||
#define LIBXL_LIB_DIR LOCALSTATEDIR "/lib/libvirt/libxl"
|
||||
#define LIBXL_SAVE_DIR LIBXL_LIB_DIR "/save"
|
||||
#define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
|
||||
#define LIBXL_CHANNEL_DIR LIBXL_LIB_DIR "/channel/target"
|
||||
#define LIBXL_BOOTLOADER_PATH "pygrub"
|
||||
|
||||
|
||||
typedef struct _libxlDriverPrivate libxlDriverPrivate;
|
||||
@ -141,12 +140,12 @@ struct _libxlDriverPrivate {
|
||||
virLockManagerPluginPtr lockManager;
|
||||
};
|
||||
|
||||
# define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r"
|
||||
# ifdef LIBXL_HAVE_SRM_V2
|
||||
# define LIBXL_SAVE_VERSION 2
|
||||
# else
|
||||
# define LIBXL_SAVE_VERSION 1
|
||||
# endif
|
||||
#define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r"
|
||||
#ifdef LIBXL_HAVE_SRM_V2
|
||||
# define LIBXL_SAVE_VERSION 2
|
||||
#else
|
||||
# define LIBXL_SAVE_VERSION 1
|
||||
#endif
|
||||
|
||||
typedef struct _libxlSavefileHeader libxlSavefileHeader;
|
||||
typedef libxlSavefileHeader *libxlSavefileHeaderPtr;
|
||||
@ -193,23 +192,23 @@ libxlMakeVfb(virPortAllocatorRangePtr graphicsports,
|
||||
int
|
||||
libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev);
|
||||
|
||||
# ifdef LIBXL_HAVE_PVUSB
|
||||
#ifdef LIBXL_HAVE_PVUSB
|
||||
int
|
||||
libxlMakeUSBController(virDomainControllerDefPtr controller,
|
||||
libxl_device_usbctrl *usbctrl);
|
||||
|
||||
int
|
||||
libxlMakeUSB(virDomainHostdevDefPtr hostdev, libxl_device_usbdev *usbdev);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
virDomainXMLOptionPtr
|
||||
libxlCreateXMLConf(void);
|
||||
|
||||
# ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||
# define LIBXL_ATTR_UNUSED
|
||||
# else
|
||||
# define LIBXL_ATTR_UNUSED ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||
# define LIBXL_ATTR_UNUSED
|
||||
#else
|
||||
# define LIBXL_ATTR_UNUSED ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
int
|
||||
libxlBuildDomainConfig(virPortAllocatorRangePtr graphicsports,
|
||||
virDomainDefPtr def,
|
||||
@ -227,5 +226,3 @@ libxlDriverUnlock(libxlDriverPrivatePtr driver)
|
||||
{
|
||||
virMutexUnlock(&driver->lock);
|
||||
}
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_CONF_H */
|
||||
|
@ -18,18 +18,17 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_DOMAIN_H
|
||||
# define LIBVIRT_LIBXL_DOMAIN_H
|
||||
#pragma once
|
||||
|
||||
# include <libxl.h>
|
||||
#include <libxl.h>
|
||||
|
||||
# include "domain_conf.h"
|
||||
# include "libxl_conf.h"
|
||||
# include "virchrdev.h"
|
||||
# include "virenum.h"
|
||||
#include "domain_conf.h"
|
||||
#include "libxl_conf.h"
|
||||
#include "virchrdev.h"
|
||||
#include "virenum.h"
|
||||
|
||||
# define JOB_MASK(job) (job == 0 ? 0 : 1 << (job - 1))
|
||||
# define DEFAULT_JOB_MASK \
|
||||
#define JOB_MASK(job) (job == 0 ? 0 : 1 << (job - 1))
|
||||
#define DEFAULT_JOB_MASK \
|
||||
(JOB_MASK(LIBXL_JOB_DESTROY) | \
|
||||
JOB_MASK(LIBXL_JOB_ABORT))
|
||||
|
||||
@ -122,11 +121,11 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver,
|
||||
* Detect which signature to use based on
|
||||
* LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG.
|
||||
*/
|
||||
# ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG
|
||||
# define VIR_LIBXL_EVENT_CONST /* empty */
|
||||
# else
|
||||
# define VIR_LIBXL_EVENT_CONST const
|
||||
# endif
|
||||
#ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG
|
||||
# define VIR_LIBXL_EVENT_CONST /* empty */
|
||||
#else
|
||||
# define VIR_LIBXL_EVENT_CONST const
|
||||
#endif
|
||||
|
||||
void
|
||||
libxlDomainEventHandler(void *data,
|
||||
@ -156,5 +155,3 @@ bool
|
||||
libxlDomainDefCheckABIStability(libxlDriverPrivatePtr driver,
|
||||
virDomainDefPtr src,
|
||||
virDomainDefPtr dst);
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_DOMAIN_H */
|
||||
|
@ -18,9 +18,6 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_DRIVER_H
|
||||
# define LIBVIRT_LIBXL_DRIVER_H
|
||||
#pragma once
|
||||
|
||||
int libxlRegister(void);
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_DRIVER_H */
|
||||
|
@ -18,10 +18,9 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_LOGGER_H
|
||||
# define LIBVIRT_LIBXL_LOGGER_H
|
||||
#pragma once
|
||||
|
||||
# include "util/virlog.h"
|
||||
#include "util/virlog.h"
|
||||
|
||||
typedef struct xentoollog_logger_libvirt libxlLogger;
|
||||
typedef libxlLogger *libxlLoggerPtr;
|
||||
@ -33,5 +32,3 @@ void libxlLoggerFree(libxlLoggerPtr logger);
|
||||
void libxlLoggerOpenFile(libxlLoggerPtr logger, int id, const char *name,
|
||||
const char *domain_config);
|
||||
void libxlLoggerCloseFile(libxlLoggerPtr logger, int id);
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_LOGGER_H */
|
||||
|
@ -18,12 +18,11 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LIBXL_MIGRATION_H
|
||||
# define LIBVIRT_LIBXL_MIGRATION_H
|
||||
#pragma once
|
||||
|
||||
# include "libxl_conf.h"
|
||||
#include "libxl_conf.h"
|
||||
|
||||
# define LIBXL_MIGRATION_FLAGS \
|
||||
#define LIBXL_MIGRATION_FLAGS \
|
||||
(VIR_MIGRATE_LIVE | \
|
||||
VIR_MIGRATE_PEER2PEER | \
|
||||
VIR_MIGRATE_TUNNELLED | \
|
||||
@ -32,7 +31,7 @@
|
||||
VIR_MIGRATE_PAUSED)
|
||||
|
||||
/* All supported migration parameters and their types. */
|
||||
# define LIBXL_MIGRATION_PARAMETERS \
|
||||
#define LIBXL_MIGRATION_PARAMETERS \
|
||||
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
|
||||
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
|
||||
VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \
|
||||
@ -97,5 +96,3 @@ libxlDomainMigrationSrcConfirm(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
unsigned int flags,
|
||||
int cancelled);
|
||||
|
||||
#endif /* LIBVIRT_LIBXL_MIGRATION_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user