src/bhyve: 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-07 15:20:15 -05:00 committed by Ján Tomko
parent 99527e9e0c
commit b7356e826c
10 changed files with 42 additions and 72 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -19,21 +19,20 @@
*
*/
#ifndef LIBVIRT_BHYVE_UTILS_H
# define LIBVIRT_BHYVE_UTILS_H
#pragma once
# include "driver.h"
# include "domain_event.h"
# include "configmake.h"
# include "virdomainobjlist.h"
# include "virthread.h"
# include "virclosecallbacks.h"
# include "virportallocator.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"
#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 */