src/qemu: 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:12:37 -05:00 committed by Ján Tomko
parent 7d0c966278
commit 5dad4b5d93
32 changed files with 223 additions and 317 deletions

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_AGENT_H
# define LIBVIRT_QEMU_AGENT_H
#pragma once
#include "internal.h"
#include "domain_conf.h"
@ -121,4 +120,3 @@ int qemuAgentSetUserPassword(qemuAgentPtr mon,
const char *user,
const char *password,
bool crypted);
#endif /* LIBVIRT_QEMU_AGENT_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_ALIAS_H
# define LIBVIRT_QEMU_ALIAS_H
#pragma once
#include "domain_conf.h"
@ -96,5 +95,3 @@ char *qemuAliasChardevFromDevAlias(const char *devAlias)
const char *qemuDomainGetManagedPRAlias(void);
char *qemuDomainGetUnmanagedPRAlias(const char *parentalias);
#endif /* LIBVIRT_QEMU_ALIAS_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_BLOCK_H
# define LIBVIRT_QEMU_BLOCK_H
#pragma once
#include "internal.h"
@ -127,5 +126,3 @@ qemuBlockSnapshotAddLegacy(virJSONValuePtr actions,
virDomainDiskDefPtr disk,
virStorageSourcePtr newsrc,
bool reuse);
#endif /* LIBVIRT_QEMU_BLOCK_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_BLOCKJOB_H
# define LIBVIRT_QEMU_BLOCKJOB_H
#pragma once
#include "internal.h"
#include "qemu_conf.h"
@ -113,5 +112,3 @@ void qemuBlockJobSyncEnd(virDomainObjPtr vm,
qemuBlockJobDataPtr
qemuBlockJobGetByDisk(virDomainDiskDefPtr disk)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_QEMU_BLOCKJOB_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_CAPABILITIES_H
# define LIBVIRT_QEMU_CAPABILITIES_H
#pragma once
#include "virobject.h"
#include "capabilities.h"
@ -651,5 +650,3 @@ virQEMUCapsGetSEVCapabilities(virQEMUCapsPtr qemuCaps);
virArch virQEMUCapsArchFromString(const char *arch);
const char *virQEMUCapsArchToString(virArch arch);
#endif /* LIBVIRT_QEMU_CAPABILITIES_H */

View File

@ -23,8 +23,7 @@
# error "qemu_capspriv.h may only be included by qemu_capabilities.c or test suites"
#endif /* LIBVIRT_QEMU_CAPSPRIV_H_ALLOW */
#ifndef LIBVIRT_QEMU_CAPSPRIV_H
# define LIBVIRT_QEMU_CAPSPRIV_H
#pragma once
virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps);
@ -105,5 +104,3 @@ virQEMUCapsSetMicrocodeVersion(virQEMUCapsPtr qemuCaps,
void
virQEMUCapsStripMachineAliases(virQEMUCapsPtr qemuCaps);
#endif /* LIBVIRT_QEMU_CAPSPRIV_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_CGROUP_H
# define LIBVIRT_QEMU_CGROUP_H
#pragma once
#include "virusb.h"
#include "vircgroup.h"
@ -82,4 +81,3 @@ int qemuCgroupEmulatorAllNodesAllow(virCgroupPtr cgroup,
void qemuCgroupEmulatorAllNodesRestore(qemuCgroupEmulatorAllNodesDataPtr data);
extern const char *const defaultDeviceACL[];
#endif /* LIBVIRT_QEMU_CGROUP_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_COMMAND_H
# define LIBVIRT_QEMU_COMMAND_H
#pragma once
#include "domain_addr.h"
#include "domain_conf.h"
@ -227,5 +226,3 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev,
int *cancelfd)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4);
#endif /* LIBVIRT_QEMU_COMMAND_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_CONF_H
# define LIBVIRT_QEMU_CONF_H
#pragma once
#include <unistd.h>
@ -381,4 +380,3 @@ int qemuGetMemoryBackingPath(const virDomainDef *def,
virQEMUDriverConfigPtr cfg,
const char *alias,
char **memPath);
#endif /* LIBVIRT_QEMU_CONF_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_DOMAIN_H
# define LIBVIRT_QEMU_DOMAIN_H
#pragma once
#include "virthread.h"
#include "vircgroup.h"
@ -1128,5 +1127,3 @@ qemuDomainNVRAMPathGenerate(virQEMUDriverConfigPtr cfg,
virDomainEventSuspendedDetailType
qemuDomainPausedReasonToSuspendedEvent(virDomainPausedReason reason);
#endif /* LIBVIRT_QEMU_DOMAIN_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_DOMAIN_ADDRESS_H
# define LIBVIRT_QEMU_DOMAIN_ADDRESS_H
#pragma once
#include "domain_addr.h"
#include "domain_conf.h"
@ -64,5 +63,3 @@ int qemuDomainEnsureVirtioAddress(bool *releaseAddr,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
const char *devicename);
#endif /* LIBVIRT_QEMU_DOMAIN_ADDRESS_H */

View File

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

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_EXTDEVICE_H
# define LIBVIRT_QEMU_EXTDEVICE_H
#pragma once
#include "qemu_conf.h"
#include "qemu_domain.h"
@ -54,5 +53,3 @@ bool qemuExtDevicesHasDevice(virDomainDefPtr def);
int qemuExtDevicesSetupCgroup(virQEMUDriverPtr driver,
virDomainDefPtr def,
virCgroupPtr cgroup);
#endif /* LIBVIRT_QEMU_EXTDEVICE_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_FIRMWARE_H
# define LIBVIRT_QEMU_FIRMWARE_H
#pragma once
#include "domain_conf.h"
#include "qemu_conf.h"
@ -57,5 +56,3 @@ qemuFirmwareGetSupported(const char *machine,
bool *secure);
verify(VIR_DOMAIN_OS_DEF_FIRMWARE_LAST <= 64);
#endif /* LIBVIRT_QEMU_FIRMWARE_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_HOSTDEV_H
# define LIBVIRT_QEMU_HOSTDEV_H
#pragma once
#include "qemu_conf.h"
#include "domain_conf.h"
@ -90,5 +89,3 @@ void qemuHostdevReAttachMediatedDevices(virQEMUDriverPtr driver,
int nhostdevs);
void qemuHostdevReAttachDomainDevices(virQEMUDriverPtr driver,
virDomainDefPtr def);
#endif /* LIBVIRT_QEMU_HOSTDEV_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_HOTPLUG_H
# define LIBVIRT_QEMU_HOTPLUG_H
#pragma once
#include "qemu_conf.h"
#include "qemu_domain.h"
@ -151,5 +150,3 @@ int qemuDomainSetVcpuInternal(virQEMUDriverPtr driver,
virDomainDefPtr persistentDef,
virBitmapPtr vcpus,
bool state);
#endif /* LIBVIRT_QEMU_HOTPLUG_H */

View File

@ -23,13 +23,10 @@
# error "qemu_hotplugpriv.h may only be included by qemu_hotplug.c or test suites"
#endif /* LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW */
#ifndef LIBVIRT_QEMU_HOTPLUGPRIV_H
# define LIBVIRT_QEMU_HOTPLUGPRIV_H
#pragma once
/*
* This header file should never be used outside unit tests.
*/
extern unsigned long long qemuDomainRemoveDeviceWaitTime;
#endif /* LIBVIRT_QEMU_HOTPLUGPRIV_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_INTERFACE_H
# define LIBVIRT_QEMU_INTERFACE_H
#pragma once
#include "domain_conf.h"
#include "qemu_conf.h"
@ -55,4 +54,3 @@ int qemuInterfaceOpenVhostNet(virDomainDefPtr def,
virDomainNetDefPtr net,
int *vhostfd,
size_t *vhostfdSize);
#endif /* LIBVIRT_QEMU_INTERFACE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_QEMU_MIGRATION_H
# define LIBVIRT_QEMU_MIGRATION_H
#pragma once
#include "qemu_conf.h"
#include "qemu_domain.h"
@ -254,5 +253,3 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob,
qemuDomainJobInfoPtr jobInfo);
#endif /* LIBVIRT_QEMU_MIGRATION_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_MIGRATION_COOKIE_H
# define LIBVIRT_QEMU_MIGRATION_COOKIE_H
#pragma once
#include "qemu_migration_params.h"
#include "virenum.h"
@ -177,5 +176,3 @@ qemuMigrationCookieAddPersistent(qemuMigrationCookiePtr mig,
virDomainDefPtr
qemuMigrationCookieGetPersistent(qemuMigrationCookiePtr mig);
#endif /* LIBVIRT_QEMU_MIGRATION_COOKIE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_QEMU_MIGRATION_PARAMS_H
# define LIBVIRT_QEMU_MIGRATION_PARAMS_H
#pragma once
#include "internal.h"
@ -161,5 +160,3 @@ qemuMigrationCapsCheck(virQEMUDriverPtr driver,
bool
qemuMigrationCapsGet(virDomainObjPtr vm,
qemuMigrationCapability cap);
#endif /* LIBVIRT_QEMU_MIGRATION_PARAMS_H */

View File

@ -23,8 +23,7 @@
# error "qemu_migration_paramspriv.h may only be included by qemu_migration_params.c or test suites"
#endif /* LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H_ALLOW */
#ifndef LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H
# define LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H
#pragma once
virJSONValuePtr
qemuMigrationParamsToJSON(qemuMigrationParamsPtr migParams);
@ -35,5 +34,3 @@ qemuMigrationParamsFromJSON(virJSONValuePtr params);
virJSONValuePtr
qemuMigrationCapsToJSON(virBitmapPtr caps,
virBitmapPtr states);
#endif /* LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_MONITOR_H
# define LIBVIRT_QEMU_MONITOR_H
#pragma once
#include "internal.h"
@ -1252,5 +1251,3 @@ struct _qemuMonitorCurrentMachineInfo {
int qemuMonitorGetCurrentMachineInfo(qemuMonitorPtr mon,
qemuMonitorCurrentMachineInfoPtr info);
#endif /* LIBVIRT_QEMU_MONITOR_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_MONITOR_JSON_H
# define LIBVIRT_QEMU_MONITOR_JSON_H
#pragma once
#include "internal.h"
@ -600,5 +599,3 @@ int qemuMonitorJSONMergeBitmaps(qemuMonitorPtr mon,
int qemuMonitorJSONDeleteBitmap(qemuMonitorPtr mon,
const char *node,
const char *bitmap);
#endif /* LIBVIRT_QEMU_MONITOR_JSON_H */

View File

@ -20,12 +20,9 @@
# error "qemu_monitor_priv.h may only be included by qemu_monitor.c or test suites"
#endif /* LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW */
#ifndef LIBVIRT_QEMU_MONITOR_PRIV_H
# define LIBVIRT_QEMU_MONITOR_PRIV_H
#pragma once
#include "qemu_monitor.h"
void
qemuMonitorResetCommandID(qemuMonitorPtr mon);
#endif /* LIBVIRT_QEMU_MONITOR_PRIV_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_MONITOR_TEXT_H
# define LIBVIRT_QEMU_MONITOR_TEXT_H
#pragma once
#include "internal.h"
@ -37,5 +36,3 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name);
#endif /* LIBVIRT_QEMU_MONITOR_TEXT_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_PARSE_COMMAND_H
# define LIBVIRT_QEMU_PARSE_COMMAND_H
#pragma once
#include "virfilecache.h"
@ -56,5 +55,3 @@ qemuParseKeywords(const char *str,
char ***retvalues,
int *retnkeywords,
int allowEmptyValue);
#endif /* LIBVIRT_QEMU_PARSE_COMMAND_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_QEMU_PROCESS_H
# define LIBVIRT_QEMU_PROCESS_H
#pragma once
#include "qemu_conf.h"
#include "qemu_domain.h"
@ -242,5 +241,3 @@ qemuProcessQMPPtr qemuProcessQMPNew(const char *binary,
void qemuProcessQMPFree(qemuProcessQMPPtr proc);
int qemuProcessQMPStart(qemuProcessQMPPtr proc);
#endif /* LIBVIRT_QEMU_PROCESS_H */

View File

@ -23,8 +23,7 @@
# error "qemu_process_priv.h may only be included by qemu_process.c or test suites"
#endif /* LIBVIRT_QEMU_PROCESSPRIV_H_ALLOW */
#ifndef LIBVIRT_QEMU_PROCESSPRIV_H
# define LIBVIRT_QEMU_PROCESSPRIV_H
#pragma once
#include "domain_conf.h"
#include "qemu_monitor.h"
@ -39,5 +38,3 @@ int qemuProcessHandleDeviceDeleted(qemuMonitorPtr mon,
void *opaque);
int qemuProcessQMPInitMonitor(qemuMonitorPtr mon);
#endif /* LIBVIRT_QEMU_PROCESSPRIV_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_QAPI_H
# define LIBVIRT_QEMU_QAPI_H
#pragma once
#include "internal.h"
@ -35,6 +34,3 @@ virQEMUQAPISchemaPathExists(const char *query,
virHashTablePtr
virQEMUQAPISchemaConvert(virJSONValuePtr schemareply);
#endif /* LIBVIRT_QEMU_QAPI_H */

View File

@ -18,9 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_SECURITY_H
# define LIBVIRT_QEMU_SECURITY_H
#pragma once
#include "qemu_conf.h"
#include "domain_conf.h"
@ -124,5 +122,3 @@ int qemuSecurityRestoreSavedStateLabel(virQEMUDriverPtr driver,
#define qemuSecuritySetTapFDLabel virSecurityManagerSetTapFDLabel
#define qemuSecurityStackAddNested virSecurityManagerStackAddNested
#define qemuSecurityVerify virSecurityManagerVerify
#endif /* LIBVIRT_QEMU_SECURITY_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_TPM_H
# define LIBVIRT_QEMU_TPM_H
#pragma once
#include "vircommand.h"
@ -51,5 +50,3 @@ int qemuExtTPMSetupCgroup(virQEMUDriverPtr driver,
virCgroupPtr cgroup)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_QEMU_TPM_H */