xen: 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:13:13 -05:00 committed by Ján Tomko
parent faceedaf71
commit 78b2a03966
8 changed files with 47 additions and 71 deletions

View File

@ -17,9 +17,6 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XENAPI_DRIVER_H
# define LIBVIRT_XENAPI_DRIVER_H
#pragma once
int xenapiRegister(void);
#endif /* LIBVIRT_XENAPI_DRIVER_H */

View File

@ -17,17 +17,16 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XENAPI_DRIVER_PRIVATE_H
# define LIBVIRT_XENAPI_DRIVER_PRIVATE_H
#pragma once
# include <libxml/tree.h>
# include <xen/api/xen_common.h>
# include "virerror.h"
#include <libxml/tree.h>
#include <xen/api/xen_common.h>
#include "virerror.h"
/*# define PRINT_XML*/
# define VIR_FROM_THIS VIR_FROM_XENAPI
# define LIBVIRT_MODELNAME_LEN (32)
# define xenapiSessionErrorHandler(conn, errNum, buf) \
#define VIR_FROM_THIS VIR_FROM_XENAPI
#define LIBVIRT_MODELNAME_LEN (32)
#define xenapiSessionErrorHandler(conn, errNum, buf) \
xenapiSessionErrorHandle(conn, errNum, buf, \
__FILE__, __FUNCTION__, __LINE__)
@ -57,5 +56,3 @@ struct _xenapiPrivate {
virCapsPtr caps;
virDomainXMLOptionPtr xmlopt;
};
#endif /* LIBVIRT_XENAPI_DRIVER_PRIVATE_H */

View File

@ -18,15 +18,14 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XENAPI_UTILS_H
# define LIBVIRT_XENAPI_UTILS_H
#pragma once
# include <xen/api/xen_all.h>
# include "internal.h"
# include "viruri.h"
# include "domain_conf.h"
#include <xen/api/xen_all.h>
#include "internal.h"
#include "viruri.h"
#include "domain_conf.h"
# define NETWORK_DEVID_SIZE (12)
#define NETWORK_DEVID_SIZE (12)
typedef uint64_t cpumap_t;
@ -75,5 +74,3 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr defPtr,
int
allocStringMap (xen_string_string_map **strings, char *key, char *val);
#endif /* LIBVIRT_XENAPI_UTILS_H */

View File

@ -18,16 +18,15 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XEN_COMMON_H
# define LIBVIRT_XEN_COMMON_H
#pragma once
# include "internal.h"
# include "virconf.h"
# include "domain_conf.h"
#include "internal.h"
#include "virconf.h"
#include "domain_conf.h"
# define XEN_CONFIG_FORMAT_XL "xen-xl"
# define XEN_CONFIG_FORMAT_XM "xen-xm"
# define XEN_CONFIG_FORMAT_SEXPR "xen-sxpr"
#define XEN_CONFIG_FORMAT_XL "xen-xl"
#define XEN_CONFIG_FORMAT_XM "xen-xm"
#define XEN_CONFIG_FORMAT_SEXPR "xen-sxpr"
int xenConfigGetString(virConfPtr conf,
const char *name,
@ -68,5 +67,3 @@ int xenFormatConfigCommon(virConfPtr conf,
char *xenMakeIPList(virNetDevIPInfoPtr guestIP);
int xenDomainDefAddImplicitInputDevice(virDomainDefPtr def);
#endif /* LIBVIRT_XEN_COMMON_H */

View File

@ -20,13 +20,12 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XEN_SXPR_H
# define LIBVIRT_XEN_SXPR_H
#pragma once
# include "internal.h"
# include "virconf.h"
# include "domain_conf.h"
# include "virsexpr.h"
#include "internal.h"
#include "virconf.h"
#include "domain_conf.h"
#include "virsexpr.h"
/* helper functions to get the dom id from a sexpr */
int xenGetDomIdFromSxprString(const char *sexpr, int *id);
@ -65,5 +64,3 @@ int xenFormatSxprChr(virDomainChrDefPtr def, virBufferPtr buf);
int xenFormatSxprSound(virDomainDefPtr def, virBufferPtr buf);
char * xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def);
#endif /* LIBVIRT_XEN_SXPR_H */

View File

@ -20,12 +20,11 @@
*
*/
#ifndef LIBVIRT_XEN_XL_H
# define LIBVIRT_XEN_XL_H
#pragma once
# include "virconf.h"
# include "domain_conf.h"
# include "xen_common.h"
#include "virconf.h"
#include "domain_conf.h"
#include "xen_common.h"
virDomainDefPtr xenParseXL(virConfPtr conn,
virCapsPtr caps,
@ -34,5 +33,3 @@ virDomainDefPtr xenParseXL(virConfPtr conn,
virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr);
const char *xenTranslateCPUFeature(const char *feature_name, bool from_libxl);
#endif /* LIBVIRT_XEN_XL_H */

View File

@ -20,16 +20,13 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XEN_XM_H
# define LIBVIRT_XEN_XM_H
#pragma once
# include "internal.h"
# include "virconf.h"
# include "domain_conf.h"
#include "internal.h"
#include "virconf.h"
#include "domain_conf.h"
virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def);
virDomainDefPtr xenParseXM(virConfPtr conf,
virCapsPtr caps, virDomainXMLOptionPtr xmlopt);
#endif /* LIBVIRT_XEN_XM_H */

View File

@ -19,28 +19,25 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_XENXS_PRIVATE_H
# define LIBVIRT_XENXS_PRIVATE_H
#pragma once
# include "internal.h"
#include "internal.h"
# include <xen/xen.h>
# include "xen_sxpr.h"
#include <xen/xen.h>
#include "xen_sxpr.h"
/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
* headers. Its semantic was retained with XEN_LEGACY_MAX_VCPUS.
* Ensure MAX_VIRT_CPUS is defined accordingly.
*/
# if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
# endif
#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
#endif
# define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */
#define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */
# ifdef __sun
# define DEFAULT_VIF_SCRIPT "vif-vnic"
# else
# define DEFAULT_VIF_SCRIPT "vif-bridge"
# endif
#endif /* LIBVIRT_XENXS_PRIVATE_H */
#ifdef __sun
# define DEFAULT_VIF_SCRIPT "vif-vnic"
#else
# define DEFAULT_VIF_SCRIPT "vif-bridge"
#endif