Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/lxc/lxc_cgroup.h | 13 +++++-------
src/lxc/lxc_conf.h | 47 +++++++++++++++++++----------------------
src/lxc/lxc_container.h | 37 +++++++++++++++-----------------
src/lxc/lxc_domain.h | 13 +++++-------
src/lxc/lxc_driver.h | 5 +----
src/lxc/lxc_fuse.h | 15 ++++++-------
src/lxc/lxc_hostdev.h | 9 +++-----
src/lxc/lxc_monitor.h | 11 ++++------
src/lxc/lxc_native.h | 11 ++++------
src/lxc/lxc_process.h | 7 ++----
10 files changed, 69 insertions(+), 99 deletions(-)
diff --git a/src/lxc/lxc_cgroup.h b/src/lxc/lxc_cgroup.h
index 8b32ca1ede..63e9e837b0 100644
--- a/src/lxc/lxc_cgroup.h
+++ b/src/lxc/lxc_cgroup.h
@@ -19,13 +19,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_CGROUP_H
-# define LIBVIRT_LXC_CGROUP_H
+#pragma once
-# include "vircgroup.h"
-# include "domain_conf.h"
-# include "lxc_fuse.h"
-# include "virusb.h"
+#include "vircgroup.h"
+#include "domain_conf.h"
+#include "lxc_fuse.h"
+#include "virusb.h"
virCgroupPtr virLXCCgroupCreate(virDomainDefPtr def,
pid_t initpid,
@@ -47,5 +46,3 @@ int
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev,
const char *path,
void *opaque);
-
-#endif /* LIBVIRT_LXC_CGROUP_H */
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index d6a1f1ca10..dc5531ebf9 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -19,29 +19,28 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_CONF_H
-# define LIBVIRT_LXC_CONF_H
-
-# include "internal.h"
-# include "libvirt_internal.h"
-# include "domain_conf.h"
-# include "domain_event.h"
-# include "capabilities.h"
-# include "virthread.h"
-# include "security/security_manager.h"
-# include "configmake.h"
-# include "vircgroup.h"
-# include "virsysinfo.h"
-# include "virusb.h"
-# include "virclosecallbacks.h"
-# include "virhostdev.h"
-
-# define LXC_DRIVER_NAME "LXC"
-
-# define LXC_CONFIG_DIR SYSCONFDIR "/libvirt/lxc"
-# define LXC_STATE_DIR LOCALSTATEDIR "/run/libvirt/lxc"
-# define LXC_LOG_DIR LOCALSTATEDIR "/log/libvirt/lxc"
-# define LXC_AUTOSTART_DIR LXC_CONFIG_DIR "/autostart"
+#pragma once
+
+#include "internal.h"
+#include "libvirt_internal.h"
+#include "domain_conf.h"
+#include "domain_event.h"
+#include "capabilities.h"
+#include "virthread.h"
+#include "security/security_manager.h"
+#include "configmake.h"
+#include "vircgroup.h"
+#include "virsysinfo.h"
+#include "virusb.h"
+#include "virclosecallbacks.h"
+#include "virhostdev.h"
+
+#define LXC_DRIVER_NAME "LXC"
+
+#define LXC_CONFIG_DIR SYSCONFDIR "/libvirt/lxc"
+#define LXC_STATE_DIR LOCALSTATEDIR "/run/libvirt/lxc"
+#define LXC_LOG_DIR LOCALSTATEDIR "/log/libvirt/lxc"
+#define LXC_AUTOSTART_DIR LXC_CONFIG_DIR "/autostart"
typedef struct _virLXCDriver virLXCDriver;
typedef virLXCDriver *virLXCDriverPtr;
@@ -120,5 +119,3 @@ static inline void lxcDriverUnlock(virLXCDriverPtr driver)
{
virMutexUnlock(&driver->lock);
}
-
-#endif /* LIBVIRT_LXC_CONF_H */
diff --git a/src/lxc/lxc_container.h b/src/lxc/lxc_container.h
index 240c79d5ac..94a6c5309c 100644
--- a/src/lxc/lxc_container.h
+++ b/src/lxc/lxc_container.h
@@ -18,29 +18,28 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_CONTAINER_H
-# define LIBVIRT_LXC_CONTAINER_H
+#pragma once
-# include "lxc_conf.h"
-# include "lxc_domain.h"
-# include "security/security_manager.h"
+#include "lxc_conf.h"
+#include "lxc_domain.h"
+#include "security/security_manager.h"
-# define LXC_DEV_MAJ_MEMORY 1
-# define LXC_DEV_MIN_NULL 3
-# define LXC_DEV_MIN_ZERO 5
-# define LXC_DEV_MIN_FULL 7
-# define LXC_DEV_MIN_RANDOM 8
-# define LXC_DEV_MIN_URANDOM 9
+#define LXC_DEV_MAJ_MEMORY 1
+#define LXC_DEV_MIN_NULL 3
+#define LXC_DEV_MIN_ZERO 5
+#define LXC_DEV_MIN_FULL 7
+#define LXC_DEV_MIN_RANDOM 8
+#define LXC_DEV_MIN_URANDOM 9
-# define LXC_DEV_MAJ_TTY 5
-# define LXC_DEV_MIN_TTY 0
-# define LXC_DEV_MIN_CONSOLE 1
-# define LXC_DEV_MIN_PTMX 2
+#define LXC_DEV_MAJ_TTY 5
+#define LXC_DEV_MIN_TTY 0
+#define LXC_DEV_MIN_CONSOLE 1
+#define LXC_DEV_MIN_PTMX 2
-# define LXC_DEV_MAJ_PTY 136
+#define LXC_DEV_MAJ_PTY 136
-# define LXC_DEV_MAJ_FUSE 10
-# define LXC_DEV_MIN_FUSE 229
+#define LXC_DEV_MAJ_FUSE 10
+#define LXC_DEV_MIN_FUSE 229
int lxcContainerSendContinue(int control);
int lxcContainerWaitForContinue(int control);
@@ -64,5 +63,3 @@ virArch lxcContainerGetAlt32bitArch(virArch arch);
int lxcContainerChown(virDomainDefPtr def, const char *path);
bool lxcIsBasicMountLocation(const char *path);
-
-#endif /* LIBVIRT_LXC_CONTAINER_H */
diff --git a/src/lxc/lxc_domain.h b/src/lxc/lxc_domain.h
index 2048481829..92ed4ac594 100644
--- a/src/lxc/lxc_domain.h
+++ b/src/lxc/lxc_domain.h
@@ -19,13 +19,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_DOMAIN_H
-# define LIBVIRT_LXC_DOMAIN_H
+#pragma once
-# include "vircgroup.h"
-# include "lxc_conf.h"
-# include "lxc_monitor.h"
-# include "virenum.h"
+#include "vircgroup.h"
+#include "lxc_conf.h"
+#include "lxc_monitor.h"
+#include "virenum.h"
typedef enum {
@@ -113,5 +112,3 @@ virLXCDomainGetMachineName(virDomainDefPtr def, pid_t pid);
int
virLXCDomainSetRunlevel(virDomainObjPtr vm,
int runlevel);
-
-#endif /* LIBVIRT_LXC_DOMAIN_H */
diff --git a/src/lxc/lxc_driver.h b/src/lxc/lxc_driver.h
index 4af9bb966e..90549d02f2 100644
--- a/src/lxc/lxc_driver.h
+++ b/src/lxc/lxc_driver.h
@@ -18,10 +18,7 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_DRIVER_H
-# define LIBVIRT_LXC_DRIVER_H
+#pragma once
/* Function declarations */
int lxcRegister(void);
-
-#endif /* LIBVIRT_LXC_DRIVER_H */
diff --git a/src/lxc/lxc_fuse.h b/src/lxc/lxc_fuse.h
index 95285ae915..e9cfd9a20a 100644
--- a/src/lxc/lxc_fuse.h
+++ b/src/lxc/lxc_fuse.h
@@ -18,16 +18,15 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_FUSE_H
-# define LIBVIRT_LXC_FUSE_H
+#pragma once
-# define FUSE_USE_VERSION 26
+#define FUSE_USE_VERSION 26
-# if WITH_FUSE
-# include <fuse.h>
-# endif
+#if WITH_FUSE
+# include <fuse.h>
+#endif
-# include "lxc_conf.h"
+#include "lxc_conf.h"
struct virLXCMeminfo {
unsigned long long memtotal;
@@ -56,5 +55,3 @@ typedef struct virLXCFuse *virLXCFusePtr;
int lxcSetupFuse(virLXCFusePtr *f, virDomainDefPtr def);
int lxcStartFuse(virLXCFusePtr f);
void lxcFreeFuse(virLXCFusePtr *f);
-
-#endif /* LIBVIRT_LXC_FUSE_H */
diff --git a/src/lxc/lxc_hostdev.h b/src/lxc/lxc_hostdev.h
index 4fd8ce35d5..d2cdebddc8 100644
--- a/src/lxc/lxc_hostdev.h
+++ b/src/lxc/lxc_hostdev.h
@@ -19,11 +19,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_HOSTDEV_H
-# define LIBVIRT_LXC_HOSTDEV_H
+#pragma once
-# include "lxc_conf.h"
-# include "domain_conf.h"
+#include "lxc_conf.h"
+#include "domain_conf.h"
int virLXCUpdateActiveUSBHostdevs(virLXCDriverPtr driver,
virDomainDefPtr def);
@@ -37,5 +36,3 @@ int virLXCPrepareHostDevices(virLXCDriverPtr driver,
virDomainDefPtr def);
void virLXCDomainReAttachHostDevices(virLXCDriverPtr driver,
virDomainDefPtr def);
-
-#endif /* LIBVIRT_LXC_HOSTDEV_H */
diff --git a/src/lxc/lxc_monitor.h b/src/lxc/lxc_monitor.h
index fa47db7254..6d0944c301 100644
--- a/src/lxc/lxc_monitor.h
+++ b/src/lxc/lxc_monitor.h
@@ -18,12 +18,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_MONITOR_H
-# define LIBVIRT_LXC_MONITOR_H
+#pragma once
-# include "virobject.h"
-# include "domain_conf.h"
-# include "lxc_monitor_protocol.h"
+#include "virobject.h"
+#include "domain_conf.h"
+#include "lxc_monitor_protocol.h"
typedef struct _virLXCMonitor virLXCMonitor;
typedef virLXCMonitor *virLXCMonitorPtr;
@@ -59,5 +58,3 @@ void virLXCMonitorClose(virLXCMonitorPtr mon);
void virLXCMonitorLock(virLXCMonitorPtr mon);
void virLXCMonitorUnlock(virLXCMonitorPtr mon);
-
-#endif /* LIBVIRT_LXC_MONITOR_H */
diff --git a/src/lxc/lxc_native.h b/src/lxc/lxc_native.h
index 57725d3d2b..f16407f2e6 100644
--- a/src/lxc/lxc_native.h
+++ b/src/lxc/lxc_native.h
@@ -18,13 +18,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_NATIVE_H
-# define LIBVIRT_LXC_NATIVE_H
+#pragma once
-# include "domain_conf.h"
-# include "virenum.h"
+#include "domain_conf.h"
+#include "virenum.h"
-# define LXC_CONFIG_FORMAT "lxc-tools"
+#define LXC_CONFIG_FORMAT "lxc-tools"
typedef enum {
VIR_LXC_NETWORK_CONFIG_NAME,
@@ -46,5 +45,3 @@ VIR_ENUM_DECL(virLXCNetworkConfigEntry);
virDomainDefPtr lxcParseConfigString(const char *config,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt);
-
-#endif /* LIBVIRT_LXC_NATIVE_H */
diff --git a/src/lxc/lxc_process.h b/src/lxc/lxc_process.h
index 7489a3a420..1bf359b229 100644
--- a/src/lxc/lxc_process.h
+++ b/src/lxc/lxc_process.h
@@ -19,10 +19,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_LXC_PROCESS_H
-# define LIBVIRT_LXC_PROCESS_H
+#pragma once
-# include "lxc_conf.h"
+#include "lxc_conf.h"
int virLXCProcessStart(virConnectPtr conn,
virLXCDriverPtr driver,
@@ -54,5 +53,3 @@ char *virLXCProcessSetupInterfaceTap(virDomainDefPtr vm,
char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
virDomainDefPtr def,
virDomainNetDefPtr net);
-
-#endif /* LIBVIRT_LXC_PROCESS_H */
--
2.20.1