* <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);
int
libxlDomainGetEmulatorType(const virDomainDef *def);
-
-#endif /* LIBVIRT_LIBXL_CAPABILITIES_H */
* <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LIBXL_CONF_H
-# define LIBVIRT_LIBXL_CONF_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"
-
-# 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_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"
+#pragma once
+
+#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"
+
+#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_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;
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;
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,
{
virMutexUnlock(&driver->lock);
}
-
-#endif /* LIBVIRT_LIBXL_CONF_H */
* <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))
* 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,
libxlDomainDefCheckABIStability(libxlDriverPrivatePtr driver,
virDomainDefPtr src,
virDomainDefPtr dst);
-
-#endif /* LIBVIRT_LIBXL_DOMAIN_H */
* <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 | \
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, \
virDomainObjPtr vm,
unsigned int flags,
int cancelled);
-
-#endif /* LIBVIRT_LIBXL_MIGRATION_H */