Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/bhyve/bhyve_capabilities.h | 11 ++++-------
src/bhyve/bhyve_command.h | 15 ++++++---------
src/bhyve/bhyve_conf.h | 7 ++-----
src/bhyve/bhyve_device.h | 11 ++++-------
src/bhyve/bhyve_domain.h | 11 ++++-------
src/bhyve/bhyve_driver.h | 9 +++------
src/bhyve/bhyve_monitor.h | 11 ++++-------
src/bhyve/bhyve_parse_command.h | 5 +----
src/bhyve/bhyve_process.h | 7 ++-----
src/bhyve/bhyve_utils.h | 31 ++++++++++++++-----------------
10 files changed, 44 insertions(+), 74 deletions(-)
diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h
index db4aff4775..12926cf423 100644
--- a/src/bhyve/bhyve_capabilities.h
+++ b/src/bhyve/bhyve_capabilities.h
@@ -19,13 +19,12 @@
*
*/
-#ifndef LIBVIRT_BHYVE_CAPABILITIES_H
-# define LIBVIRT_BHYVE_CAPABILITIES_H
+#pragma once
-# include "capabilities.h"
-# include "conf/domain_capabilities.h"
+#include "capabilities.h"
+#include "conf/domain_capabilities.h"
-# include "bhyve_utils.h"
+#include "bhyve_utils.h"
virCapsPtr virBhyveCapsBuild(void);
int virBhyveDomainCapsFill(virDomainCapsPtr caps,
@@ -54,5 +53,3 @@ typedef enum {
int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
int virBhyveProbeCaps(unsigned int *caps);
-
-#endif /* LIBVIRT_BHYVE_CAPABILITIES_H */
diff --git a/src/bhyve/bhyve_command.h b/src/bhyve/bhyve_command.h
index ae0f770ac2..8c39f4eb2f 100644
--- a/src/bhyve/bhyve_command.h
+++ b/src/bhyve/bhyve_command.h
@@ -19,16 +19,15 @@
*
*/
-#ifndef LIBVIRT_BHYVE_COMMAND_H
-# define LIBVIRT_BHYVE_COMMAND_H
+#pragma once
-# include "bhyve_domain.h"
-# include "bhyve_utils.h"
+#include "bhyve_domain.h"
+#include "bhyve_utils.h"
-# include "domain_conf.h"
-# include "vircommand.h"
+#include "domain_conf.h"
+#include "vircommand.h"
-# define BHYVE_CONFIG_FORMAT_ARGV "bhyve-argv"
+#define BHYVE_CONFIG_FORMAT_ARGV "bhyve-argv"
virCommandPtr virBhyveProcessBuildBhyveCmd(virConnectPtr conn,
virDomainDefPtr def,
@@ -41,5 +40,3 @@ virBhyveProcessBuildDestroyCmd(bhyveConnPtr driver,
virCommandPtr
virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def,
const char *devmap_file, char **devicesmap_out);
-
-#endif /* LIBVIRT_BHYVE_COMMAND_H */
diff --git a/src/bhyve/bhyve_conf.h b/src/bhyve/bhyve_conf.h
index eb4a2e0fb8..7dee377c76 100644
--- a/src/bhyve/bhyve_conf.h
+++ b/src/bhyve/bhyve_conf.h
@@ -19,10 +19,9 @@
*
*/
-#ifndef LIBVIRT_BHYVE_CONF_H
-# define LIBVIRT_BHYVE_CONF_H
+#pragma once
-# include "bhyve_utils.h"
+#include "bhyve_utils.h"
virBhyveDriverConfigPtr virBhyveDriverConfigNew(void);
virBhyveDriverConfigPtr virBhyveDriverGetConfig(bhyveConnPtr driver);
@@ -37,5 +36,3 @@ struct _bhyveDomainCmdlineDef {
};
void bhyveDomainCmdlineDefFree(bhyveDomainCmdlineDefPtr def);
-
-#endif /* LIBVIRT_BHYVE_CONF_H */
diff --git a/src/bhyve/bhyve_device.h b/src/bhyve/bhyve_device.h
index 23b32e0e3e..30c08c2a61 100644
--- a/src/bhyve/bhyve_device.h
+++ b/src/bhyve/bhyve_device.h
@@ -18,12 +18,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_BHYVE_DEVICE_H
-# define LIBVIRT_BHYVE_DEVICE_H
+#pragma once
-# include "domain_conf.h"
-# include "virpci.h"
-# include "bhyve_domain.h"
+#include "domain_conf.h"
+#include "virpci.h"
+#include "bhyve_domain.h"
int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, virDomainObjPtr obj);
@@ -32,5 +31,3 @@ virDomainPCIAddressSetPtr bhyveDomainPCIAddressSetCreate(virDomainDefPtr
def,
int bhyveDomainAssignAddresses(virDomainDefPtr def, virDomainObjPtr obj)
ATTRIBUTE_NONNULL(1);
-
-#endif /* LIBVIRT_BHYVE_DEVICE_H */
diff --git a/src/bhyve/bhyve_domain.h b/src/bhyve/bhyve_domain.h
index 03a2b369d9..17cb283e54 100644
--- a/src/bhyve/bhyve_domain.h
+++ b/src/bhyve/bhyve_domain.h
@@ -18,13 +18,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_BHYVE_DOMAIN_H
-# define LIBVIRT_BHYVE_DOMAIN_H
+#pragma once
-# include "domain_addr.h"
-# include "domain_conf.h"
+#include "domain_addr.h"
+#include "domain_conf.h"
-# include "bhyve_monitor.h"
+#include "bhyve_monitor.h"
typedef struct _bhyveDomainObjPrivate bhyveDomainObjPrivate;
typedef bhyveDomainObjPrivate *bhyveDomainObjPrivatePtr;
@@ -42,5 +41,3 @@ extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig;
extern virDomainXMLNamespace virBhyveDriverDomainXMLNamespace;
bool bhyveDomainDefNeedsISAController(virDomainDefPtr def);
-
-#endif /* LIBVIRT_BHYVE_DOMAIN_H */
diff --git a/src/bhyve/bhyve_driver.h b/src/bhyve/bhyve_driver.h
index 36d1f8be85..98e75039a3 100644
--- a/src/bhyve/bhyve_driver.h
+++ b/src/bhyve/bhyve_driver.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_BHYVE_DRIVER_H
-# define LIBVIRT_BHYVE_DRIVER_H
+#pragma once
-# include "capabilities.h"
-# include "bhyve_utils.h"
+#include "capabilities.h"
+#include "bhyve_utils.h"
int bhyveRegister(void);
@@ -31,5 +30,3 @@ unsigned bhyveDriverGetCaps(virConnectPtr conn);
unsigned bhyveDriverGetGrubCaps(virConnectPtr conn);
virCapsPtr bhyveDriverGetCapabilities(bhyveConnPtr driver);
-
-#endif /* LIBVIRT_BHYVE_DRIVER_H */
diff --git a/src/bhyve/bhyve_monitor.h b/src/bhyve/bhyve_monitor.h
index 54c9e70040..226866e6d9 100644
--- a/src/bhyve/bhyve_monitor.h
+++ b/src/bhyve/bhyve_monitor.h
@@ -18,17 +18,14 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_BHYVE_MONITOR_H
-# define LIBVIRT_BHYVE_MONITOR_H
+#pragma once
-# include "internal.h"
-# include "domain_conf.h"
-# include "bhyve_utils.h"
+#include "internal.h"
+#include "domain_conf.h"
+#include "bhyve_utils.h"
typedef struct _bhyveMonitor bhyveMonitor;
typedef bhyveMonitor *bhyveMonitorPtr;
bhyveMonitorPtr bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver);
void bhyveMonitorClose(bhyveMonitorPtr mon);
-
-#endif /* LIBVIRT_BHYVE_MONITOR_H */
diff --git a/src/bhyve/bhyve_parse_command.h b/src/bhyve/bhyve_parse_command.h
index 3609107711..38521dcc55 100644
--- a/src/bhyve/bhyve_parse_command.h
+++ b/src/bhyve/bhyve_parse_command.h
@@ -18,11 +18,8 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_BHYVE_PARSE_COMMAND_H
-# define LIBVIRT_BHYVE_PARSE_COMMAND_H
+#pragma once
virDomainDefPtr bhyveParseCommandLineString(const char* nativeConfig,
unsigned caps,
virDomainXMLOptionPtr xmlopt);
-
-#endif /* LIBVIRT_BHYVE_PARSE_COMMAND_H */
diff --git a/src/bhyve/bhyve_process.h b/src/bhyve/bhyve_process.h
index f9ad5b6b5a..4f62f6be4b 100644
--- a/src/bhyve/bhyve_process.h
+++ b/src/bhyve/bhyve_process.h
@@ -19,10 +19,9 @@
*
*/
-#ifndef LIBVIRT_BHYVE_PROCESS_H
-# define LIBVIRT_BHYVE_PROCESS_H
+#pragma once
-# include "bhyve_utils.h"
+#include "bhyve_utils.h"
int virBhyveProcessStart(virConnectPtr conn,
bhyveConnPtr driver,
@@ -44,5 +43,3 @@ void virBhyveProcessReconnectAll(bhyveConnPtr driver);
typedef enum {
VIR_BHYVE_PROCESS_START_AUTODESTROY = 1 << 0,
} bhyveProcessStartFlags;
-
-#endif /* LIBVIRT_BHYVE_PROCESS_H */
diff --git a/src/bhyve/bhyve_utils.h b/src/bhyve/bhyve_utils.h
index e915bedd87..26956d7d21 100644
--- a/src/bhyve/bhyve_utils.h
+++ b/src/bhyve/bhyve_utils.h
@@ -19,21 +19,20 @@
*
*/
-#ifndef LIBVIRT_BHYVE_UTILS_H
-# define LIBVIRT_BHYVE_UTILS_H
-
-# include "driver.h"
-# include "domain_event.h"
-# include "configmake.h"
-# include "virdomainobjlist.h"
-# include "virthread.h"
-# include "virclosecallbacks.h"
-# include "virportallocator.h"
-
-# define BHYVE_AUTOSTART_DIR SYSCONFDIR "/libvirt/bhyve/autostart"
-# define BHYVE_CONFIG_DIR SYSCONFDIR "/libvirt/bhyve"
-# define BHYVE_STATE_DIR LOCALSTATEDIR "/run/libvirt/bhyve"
-# define BHYVE_LOG_DIR LOCALSTATEDIR "/log/libvirt/bhyve"
+#pragma once
+
+#include "driver.h"
+#include "domain_event.h"
+#include "configmake.h"
+#include "virdomainobjlist.h"
+#include "virthread.h"
+#include "virclosecallbacks.h"
+#include "virportallocator.h"
+
+#define BHYVE_AUTOSTART_DIR SYSCONFDIR "/libvirt/bhyve/autostart"
+#define BHYVE_CONFIG_DIR SYSCONFDIR "/libvirt/bhyve"
+#define BHYVE_STATE_DIR LOCALSTATEDIR "/run/libvirt/bhyve"
+#define BHYVE_LOG_DIR LOCALSTATEDIR "/log/libvirt/bhyve"
typedef struct _virBhyveDriverConfig virBhyveDriverConfig;
typedef struct _virBhyveDriverConfig *virBhyveDriverConfigPtr;
@@ -75,5 +74,3 @@ struct bhyveAutostartData {
void bhyveDriverLock(bhyveConnPtr driver);
void bhyveDriverUnlock(bhyveConnPtr driver);
-
-#endif /* LIBVIRT_BHYVE_UTILS_H */
--
2.20.1