util: misc: 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:08 -05:00 committed by Ján Tomko
parent 336d682d14
commit 2ad45811e2
64 changed files with 248 additions and 434 deletions

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRARPTABLE_H
# define LIBVIRT_VIRARPTABLE_H
#pragma once
#include "internal.h"
@ -40,5 +39,3 @@ struct _virArpTable {
virArpTablePtr virArpTableGet(void);
void virArpTableFree(virArpTablePtr table);
#endif /* LIBVIRT_VIRARPTABLE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRAUDIT_H
# define LIBVIRT_VIRAUDIT_H
#pragma once
#include "internal.h"
#include "virlog.h"
@ -56,5 +55,3 @@ void virAuditClose(void);
#define VIR_AUDIT_STR(str) \
((str) ? (str) : "?")
#endif /* LIBVIRT_VIRAUDIT_H */

View File

@ -20,8 +20,7 @@
*
*/
#ifndef LIBVIRT_VIRAUTH_H
# define LIBVIRT_VIRAUTH_H
#pragma once
#include "internal.h"
#include "viruri.h"
@ -53,4 +52,3 @@ char * virAuthGetPasswordPath(const char *path,
const char *servicename,
const char *username,
const char *hostname);
#endif /* LIBVIRT_VIRAUTH_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRAUTHCONFIG_H
# define LIBVIRT_VIRAUTHCONFIG_H
#pragma once
#include "internal.h"
#include "virautoclean.h"
@ -42,5 +41,3 @@ int virAuthConfigLookup(virAuthConfigPtr auth,
const char **value);
VIR_DEFINE_AUTOPTR_FUNC(virAuthConfig, virAuthConfigFree);
#endif /* LIBVIRT_VIRAUTHCONFIG_H */

View File

@ -18,8 +18,7 @@
*
*/
#ifndef LIBVIRT_VIRAUTOCLEAN_H
# define LIBVIRT_VIRAUTOCLEAN_H
#pragma once
#define VIR_AUTOPTR_FUNC_NAME(type) type##AutoPtrFree
@ -86,5 +85,3 @@
*/
#define VIR_AUTOCLEAN(type) \
__attribute__((cleanup(VIR_AUTOCLEAN_FUNC_NAME(type)))) type
#endif /* LIBVIRT_VIRAUTOCLEAN_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRBITMAP_H
# define LIBVIRT_VIRBITMAP_H
#pragma once
#include "internal.h"
#include "virautoclean.h"
@ -159,5 +158,3 @@ void virBitmapSubtract(virBitmapPtr a, virBitmapPtr b)
void virBitmapShrink(virBitmapPtr map, size_t b);
VIR_DEFINE_AUTOPTR_FUNC(virBitmap, virBitmapFree);
#endif /* LIBVIRT_VIRBITMAP_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRBUFFER_H
# define LIBVIRT_VIRBUFFER_H
#pragma once
#include <stdarg.h>
@ -115,5 +114,3 @@ int virBufferGetIndent(const virBuffer *buf, bool dynamic);
void virBufferTrim(virBufferPtr buf, const char *trim, int len);
void virBufferAddStr(virBufferPtr buf, const char *str);
#endif /* LIBVIRT_VIRBUFFER_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRCLOSECALLBACKS_H
# define LIBVIRT_VIRCLOSECALLBACKS_H
#pragma once
#include "conf/virdomainobjlist.h"
@ -49,4 +48,3 @@ virCloseCallbacksRun(virCloseCallbacksPtr closeCallbacks,
virConnectPtr conn,
virDomainObjListPtr domains,
void *opaque);
#endif /* LIBVIRT_VIRCLOSECALLBACKS_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRCONF_H
# define LIBVIRT_VIRCONF_H
#pragma once
#include "virutil.h"
#include "virenum.h"
@ -128,5 +127,3 @@ int virConfWriteMem(char *memory,
int *len,
virConfPtr conf);
int virConfLoadConfig(virConfPtr *conf, const char *name);
#endif /* LIBVIRT_VIRCONF_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRCRYPTO_H
# define LIBVIRT_VIRCRYPTO_H
#pragma once
#include "internal.h"
@ -64,5 +63,3 @@ int virCryptoEncryptData(virCryptoCipher algorithm,
uint8_t **ciphertext, size_t *ciphertextlen)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_VIRCRYPTO_H */

View File

@ -18,11 +18,8 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRDEVMAPPER_H
# define LIBVIRT_VIRDEVMAPPER_H
#pragma once
int
virDevMapperGetTargets(const char *path,
char ***devPaths);
#endif /* LIBVIRT_VIRDEVMAPPER_H */

View File

@ -21,8 +21,7 @@
* based on iptables.h
*/
#ifndef LIBVIRT_VIRDNSMASQ_H
# define LIBVIRT_VIRDNSMASQ_H
#pragma once
#include "virobject.h"
#include "virsocketaddr.h"
@ -119,4 +118,3 @@ unsigned long dnsmasqCapsGetVersion(dnsmasqCapsPtr caps);
(dnsmasqCapsGetVersion(CAPS) >= \
(DNSMASQ_RA_MAJOR_REQD * 1000000) + \
(DNSMASQ_RA_MINOR_REQD * 1000))
#endif /* LIBVIRT_VIRDNSMASQ_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIREBTABLES_H
# define LIBVIRT_VIREBTABLES_H
#pragma once
#include "virmacaddr.h"
@ -37,5 +36,3 @@ int ebtablesRemoveForwardAllowIn (ebtablesContext *ctx,
const virMacAddr *mac);
int ebtablesAddForwardPolicyReject(ebtablesContext *ctx);
#endif /* LIBVIRT_VIREBTABLES_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRENDIAN_H
# define LIBVIRT_VIRENDIAN_H
#pragma once
#include "internal.h"
@ -113,5 +112,3 @@
#define virReadBufInt16LE(buf) \
((uint16_t)(uint8_t)((buf)[0]) | \
((uint16_t)(uint8_t)((buf)[1]) << 8))
#endif /* LIBVIRT_VIRENDIAN_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRENUM_H
# define LIBVIRT_VIRENUM_H
#pragma once
#include "internal.h"
@ -76,5 +75,3 @@ virTristateSwitch virTristateSwitchFromBool(bool val);
verify((int)VIR_TRISTATE_BOOL_YES == (int)VIR_TRISTATE_SWITCH_ON);
verify((int)VIR_TRISTATE_BOOL_NO == (int)VIR_TRISTATE_SWITCH_OFF);
verify((int)VIR_TRISTATE_BOOL_ABSENT == (int)VIR_TRISTATE_SWITCH_ABSENT);
#endif /* LIBVIRT_VIRENUM_H */

View File

@ -19,8 +19,5 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIREVENT_H
# define LIBVIRT_VIREVENT_H
#pragma once
#include "internal.h"
#endif /* LIBVIRT_VIREVENT_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIREVENTPOLL_H
# define LIBVIRT_VIREVENTPOLL_H
#pragma once
#include "internal.h"
@ -125,6 +124,3 @@ int virEventPollToNativeEvents(int events);
* return -1 if wakeup failed
*/
int virEventPollInterrupt(void);
#endif /* LIBVIRT_VIREVENTPOLL_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRFCP_H
# define LIBVIRT_VIRFCP_H
#pragma once
bool
virFCIsCapableRport(const char *rport);
@ -28,5 +27,3 @@ int
virFCReadRportValue(const char *rport,
const char *entry,
char **result);
#endif /* LIBVIRT_VIRFCP_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRFDSTREAM_H
# define LIBVIRT_VIRFDSTREAM_H
#pragma once
#include "internal.h"
@ -65,4 +64,3 @@ int virFDStreamSetInternalCloseCb(virStreamPtr st,
virFDStreamInternalCloseCb cb,
void *opaque,
virFDStreamInternalCloseCbFreeOpaque fcb);
#endif /* LIBVIRT_VIRFDSTREAM_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRFILECACHE_H
# define LIBVIRT_VIRFILECACHE_H
#pragma once
#include "internal.h"
@ -133,5 +132,3 @@ int
virFileCacheInsertData(virFileCachePtr cache,
const char *name,
void *data);
#endif /* LIBVIRT_VIRFILECACHE_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRFIRMWARE_H
# define LIBVIRT_VIRFIRMWARE_H
#pragma once
#include "internal.h"
@ -44,6 +43,3 @@ virFirmwareParseList(const char *list,
virFirmwarePtr **firmwares,
size_t *nfirmwares)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRFIRMWARE_H */

View File

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

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRGIC_H
# define LIBVIRT_VIRGIC_H
#pragma once
#include "virutil.h"
#include "virenum.h"
@ -46,5 +45,3 @@ struct _virGICCapability {
virGICVersion version;
virGICImplementation implementation;
};
#endif /* LIBVIRT_VIRGIC_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRHOOK_H
# define LIBVIRT_VIRHOOK_H
#pragma once
#include "internal.h"
@ -104,5 +103,3 @@ int virHookPresent(int driver);
int virHookCall(int driver, const char *id, int op, int sub_op,
const char *extra, const char *input, char **output);
#endif /* LIBVIRT_VIRHOOK_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRIDENTITY_H
# define LIBVIRT_VIRIDENTITY_H
#pragma once
#include "virobject.h"
@ -103,6 +102,3 @@ int virIdentitySetX509DName(virIdentityPtr ident,
const char *dname);
int virIdentitySetSELinuxContext(virIdentityPtr ident,
const char *context);
#endif /* LIBVIRT_VIRIDENTITY_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRINITCTL_H
# define LIBVIRT_VIRINITCTL_H
#pragma once
typedef enum {
VIR_INITCTL_RUNLEVEL_POWEROFF = 0,
@ -38,5 +37,3 @@ extern const char *virInitctlFifos[];
int virInitctlSetRunLevel(const char *fifo,
virInitctlRunLevel level);
#endif /* LIBVIRT_VIRINITCTL_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRIPTABLES_H
# define LIBVIRT_VIRIPTABLES_H
#pragma once
#include "virsocketaddr.h"
#include "virfirewall.h"
@ -148,5 +147,3 @@ void iptablesAddOutputFixUdpChecksum (virFirewallPtr fw,
void iptablesRemoveOutputFixUdpChecksum (virFirewallPtr fw,
const char *iface,
int port);
#endif /* LIBVIRT_VIRIPTABLES_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRISCSI_H
# define LIBVIRT_VIRISCSI_H
#pragma once
#include "internal.h"
@ -68,5 +67,3 @@ virISCSINodeUpdate(const char *portal,
const char *value)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
#endif /* LIBVIRT_VIRISCSI_H */

View File

@ -20,8 +20,7 @@
*
*/
#ifndef LIBVIRT_VIRJSON_H
# define LIBVIRT_VIRJSON_H
#pragma once
#include "internal.h"
#include "virbitmap.h"
@ -164,5 +163,3 @@ char *virJSONStringReformat(const char *jsonstr, bool pretty);
virJSONValuePtr virJSONValueObjectDeflatten(virJSONValuePtr json);
VIR_DEFINE_AUTOPTR_FUNC(virJSONValue, virJSONValueFree);
#endif /* LIBVIRT_VIRJSON_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRKEYCODE_H
# define LIBVIRT_VIRKEYCODE_H
#pragma once
#include "virutil.h"
#include "virenum.h"
@ -30,5 +29,3 @@ int virKeycodeValueFromString(virKeycodeSet codeset, const char *keyname);
int virKeycodeValueTranslate(virKeycodeSet from_codeset,
virKeycodeSet to_offset,
int key_value);
#endif /* LIBVIRT_VIRKEYCODE_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRKEYFILE_H
# define LIBVIRT_VIRKEYFILE_H
#pragma once
#include "internal.h"
@ -57,5 +56,3 @@ const char *virKeyFileGetValueString(virKeyFilePtr conf,
const char *groupname,
const char *valuename)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRKEYFILE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRKMOD_H
# define LIBVIRT_VIRKMOD_H
#pragma once
#include "internal.h"
@ -31,4 +30,3 @@ char *virKModUnload(const char *)
ATTRIBUTE_NONNULL(1);
bool virKModIsBlacklisted(const char *)
ATTRIBUTE_NONNULL(1);
#endif /* LIBVIRT_VIRKMOD_H */

View File

@ -20,8 +20,7 @@
*
*/
#ifndef LIBVIRT_VIRLEASE_H
# define LIBVIRT_VIRLEASE_H
#pragma once
#include "virjson.h"
@ -41,5 +40,3 @@ int virLeaseNew(virJSONValuePtr *lease_ret,
const char *hostname,
const char *iaid,
const char *server_duid);
#endif /* LIBVIRT_VIRLEASE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRLOCKSPACE_H
# define LIBVIRT_VIRLOCKSPACE_H
#pragma once
#include "internal.h"
#include "virjson.h"
@ -58,5 +57,3 @@ int virLockSpaceReleaseResource(virLockSpacePtr lockspace,
int virLockSpaceReleaseResourcesForOwner(virLockSpacePtr lockspace,
pid_t owner);
#endif /* LIBVIRT_VIRLOCKSPACE_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRMDEV_H
# define LIBVIRT_VIRMDEV_H
#pragma once
#include "internal.h"
#include "virobject.h"
@ -140,5 +139,3 @@ virMediatedDeviceTypeReadAttrs(const char *sysfspath,
VIR_DEFINE_AUTOPTR_FUNC(virMediatedDevice, virMediatedDeviceFree);
VIR_DEFINE_AUTOPTR_FUNC(virMediatedDeviceType, virMediatedDeviceTypeFree);
#endif /* LIBVIRT_VIRMDEV_H */

View File

@ -19,11 +19,8 @@
*
*/
#ifndef LIBVIRT_VIRMODULE_H
# define LIBVIRT_VIRMODULE_H
#pragma once
int virModuleLoad(const char *path,
const char *regfunc,
bool required);
#endif /* LIBVIRT_VIRMODULE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRNODESUSPEND_H
# define LIBVIRT_VIRNODESUSPEND_H
#pragma once
#include "internal.h"
@ -29,5 +28,3 @@ int virNodeSuspend(unsigned int target,
unsigned int flags);
int virNodeSuspendGetTargetMask(unsigned int *bitmask);
#endif /* LIBVIRT_VIRNODESUSPEND_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRNUMA_H
# define LIBVIRT_VIRNUMA_H
#pragma once
#include "internal.h"
#include "virbitmap.h"
@ -66,4 +65,3 @@ int virNumaSetPagePoolSize(int node,
unsigned int page_size,
unsigned long long page_count,
bool add);
#endif /* LIBVIRT_VIRNUMA_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRPCI_H
# define LIBVIRT_VIRPCI_H
#pragma once
#include "internal.h"
#include "virmdev.h"
@ -275,5 +274,3 @@ void virPCIDeviceAddressFree(virPCIDeviceAddressPtr address);
VIR_DEFINE_AUTOPTR_FUNC(virPCIDevice, virPCIDeviceFree);
VIR_DEFINE_AUTOPTR_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree);
VIR_DEFINE_AUTOPTR_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree);
#endif /* LIBVIRT_VIRPCI_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRPERF_H
# define LIBVIRT_VIRPERF_H
#pragma once
#include "virutil.h"
#include "virautoclean.h"
@ -84,5 +83,3 @@ int virPerfReadEvent(virPerfPtr perf,
uint64_t *value);
VIR_DEFINE_AUTOPTR_FUNC(virPerf, virPerfFree);
#endif /* LIBVIRT_VIRPERF_H */

View File

@ -21,8 +21,7 @@
*
*/
#ifndef LIBVIRT_VIRPIDFILE_H
# define LIBVIRT_VIRPIDFILE_H
#pragma once
#include <sys/types.h>
#include "internal.h"
@ -75,5 +74,3 @@ int virPidFileConstructPath(bool privileged,
char **pidfile);
int virPidFileForceCleanupPath(const char *path) ATTRIBUTE_NONNULL(1);
#endif /* LIBVIRT_VIRPIDFILE_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRPOLKIT_H
# define LIBVIRT_VIRPOLKIT_H
#pragma once
#include "internal.h"
#include "vircommand.h"
@ -39,5 +38,3 @@ typedef virPolkitAgent *virPolkitAgentPtr;
void virPolkitAgentDestroy(virPolkitAgentPtr cmd);
virPolkitAgentPtr virPolkitAgentCreate(void);
#endif /* LIBVIRT_VIRPOLKIT_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRPORTALLOCATOR_H
# define LIBVIRT_VIRPORTALLOCATOR_H
#pragma once
#include "internal.h"
#include "virobject.h"
@ -41,5 +40,3 @@ int virPortAllocatorAcquire(const virPortAllocatorRange *range,
int virPortAllocatorRelease(unsigned short port);
int virPortAllocatorSetUsed(unsigned short port);
#endif /* LIBVIRT_VIRPORTALLOCATOR_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRPROCESS_H
# define LIBVIRT_VIRPROCESS_H
#pragma once
#include <sys/types.h>
@ -125,5 +124,3 @@ typedef enum {
} virProcessNamespaceFlags;
int virProcessNamespaceAvailable(unsigned int ns);
#endif /* LIBVIRT_VIRPROCESS_H */

View File

@ -20,8 +20,7 @@
*
*/
#ifndef LIBVIRT_VIRQEMU_H
# define LIBVIRT_VIRQEMU_H
#pragma once
#include "internal.h"
#include "virbuffer.h"
@ -52,5 +51,3 @@ void virQEMUBuildQemuImgKeySecretOpts(virBufferPtr buf,
virStorageEncryptionInfoDefPtr enc,
const char *alias)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
#endif /* LIBVIRT_VIRQEMU_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRRANDOM_H
# define LIBVIRT_VIRRANDOM_H
#pragma once
#include "internal.h"
@ -27,5 +26,3 @@ uint32_t virRandomInt(uint32_t max);
int virRandomBytes(unsigned char *buf, size_t buflen)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE;
#endif /* LIBVIRT_VIRRANDOM_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRRESCTRL_H
# define LIBVIRT_VIRRESCTRL_H
#pragma once
#include "internal.h"
@ -235,4 +234,3 @@ virResctrlMonitorGetCacheOccupancy(virResctrlMonitorPtr monitor,
void
virResctrlMonitorFreeStats(virResctrlMonitorStatsPtr *stats,
size_t nstats);
#endif /* LIBVIRT_VIRRESCTRL_H */

View File

@ -20,12 +20,9 @@
# error "virresctrlpriv.h may only be included by virresctrl.c or test suites"
#endif /* LIBVIRT_VIRRESCTRLPRIV_H_ALLOW */
#ifndef LIBVIRT_VIRRESCTRLPRIV_H
# define LIBVIRT_VIRRESCTRLPRIV_H
#pragma once
#include "virresctrl.h"
virResctrlAllocPtr
virResctrlAllocGetUnused(virResctrlInfoPtr resctrl);
#endif /* LIBVIRT_VIRRESCTRLPRIV_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRROTATINGFILE_H
# define LIBVIRT_VIRROTATINGFILE_H
#pragma once
#include "internal.h"
@ -58,5 +57,3 @@ ssize_t virRotatingFileReaderConsume(virRotatingFileReaderPtr file,
void virRotatingFileWriterFree(virRotatingFileWriterPtr file);
void virRotatingFileReaderFree(virRotatingFileReaderPtr file);
#endif /* LIBVIRT_VIRROTATINGFILE_H */

View File

@ -19,8 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRSECLABEL_H
# define LIBVIRT_VIRSECLABEL_H
#pragma once
typedef enum {
VIR_DOMAIN_SECLABEL_DEFAULT,
@ -67,5 +66,3 @@ virSecurityDeviceLabelDefCopy(const virSecurityDeviceLabelDef *src)
void virSecurityLabelDefFree(virSecurityLabelDefPtr def);
void virSecurityDeviceLabelDefFree(virSecurityDeviceLabelDefPtr def);
#endif /* LIBVIRT_VIRSECLABEL_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRSECRET_H
# define LIBVIRT_VIRSECRET_H
#pragma once
#include "internal.h"
@ -57,4 +56,3 @@ int virSecretLookupParseSecret(xmlNodePtr secretnode,
void virSecretLookupFormatSecret(virBufferPtr buf,
const char *secrettype,
virSecretLookupTypeDefPtr def);
#endif /* LIBVIRT_VIRSECRET_H */

View File

@ -20,8 +20,7 @@
*
*/
#ifndef LIBVIRT_VIRSEXPR_H
# define LIBVIRT_VIRSEXPR_H
#pragma once
#include "internal.h"
#include "virbuffer.h"
@ -65,5 +64,3 @@ int sexpr_has(const struct sexpr *sexpr, const char *node);
int sexpr_int(const struct sexpr *sexpr, const char *name);
double sexpr_float(const struct sexpr *sexpr, const char *name);
uint64_t sexpr_u64(const struct sexpr *sexpr, const char *name);
#endif /* LIBVIRT_VIRSEXPR_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRSYSTEMD_H
# define LIBVIRT_VIRSYSTEMD_H
#pragma once
#include "internal.h"
@ -50,5 +49,3 @@ int virSystemdCanHibernate(bool *result);
int virSystemdCanHybridSleep(bool *result);
char *virSystemdGetMachineNameByPID(pid_t pid);
#endif /* LIBVIRT_VIRSYSTEMD_H */

View File

@ -23,11 +23,8 @@
# error "virsystemdpriv.h may only be included by virsystemd.c or test suites"
#endif /* LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW */
#ifndef LIBVIRT_VIRSYSTEMDPRIV_H
# define LIBVIRT_VIRSYSTEMDPRIV_H
#pragma once
#include "virsystemd.h"
void virSystemdHasMachinedResetCachedValue(void);
#endif /* LIBVIRT_VIRSYSTEMDPRIV_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRTIME_H
# define LIBVIRT_VIRTIME_H
#pragma once
#include <time.h>
@ -72,5 +71,3 @@ int virTimeBackOffStart(virTimeBackOffVar *var,
unsigned long long first, unsigned long long timeout);
bool virTimeBackOffWait(virTimeBackOffVar *var);
#endif /* LIBVIRT_VIRTIME_H */

View File

@ -18,9 +18,6 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRTPM_H
# define LIBVIRT_VIRTPM_H
#pragma once
char *virTPMCreateCancelPath(const char *devpath) ATTRIBUTE_NOINLINE;
#endif /* LIBVIRT_VIRTPM_H */

View File

@ -19,8 +19,7 @@
*
*/
#ifndef LIBVIRT_VIRTYPEDPARAM_H
# define LIBVIRT_VIRTYPEDPARAM_H
#pragma once
#include "internal.h"
#include "virutil.h"
@ -134,5 +133,3 @@ VIR_ENUM_DECL(virTypedParameter);
VIR_FREE(_value); \
} \
} while (0)
#endif /* LIBVIRT_VIRTYPEDPARAM_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRURI_H
# define LIBVIRT_VIRURI_H
#pragma once
#include <libxml/uri.h>
@ -65,5 +64,3 @@ VIR_DEFINE_AUTOPTR_FUNC(virURI, virURIFree);
int virURIResolveAlias(virConfPtr conf, const char *alias, char **uri);
#define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")
#endif /* LIBVIRT_VIRURI_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRUSB_H
# define LIBVIRT_VIRUSB_H
#pragma once
#include "internal.h"
#include "virobject.h"
@ -97,5 +96,3 @@ virUSBDevicePtr virUSBDeviceListFind(virUSBDeviceListPtr list,
virUSBDevicePtr dev);
VIR_DEFINE_AUTOPTR_FUNC(virUSBDevice, virUSBDeviceFree);
#endif /* LIBVIRT_VIRUSB_H */

View File

@ -20,8 +20,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRUTIL_H
# define LIBVIRT_VIRUTIL_H
#pragma once
#include "internal.h"
#include <unistd.h>
@ -174,5 +173,3 @@ char *virHostGetDRMRenderNode(void) ATTRIBUTE_NOINLINE;
*/
#define VIR_ASSIGN_IS_OVERFLOW(lvalue, rvalue) \
(((lvalue) = (rvalue)) != (rvalue))
#endif /* LIBVIRT_VIRUTIL_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRUUID_H
# define LIBVIRT_VIRUUID_H
#pragma once
#include "internal.h"
@ -54,5 +53,3 @@ int virUUIDParse(const char *uuidstr,
const char *virUUIDFormat(const unsigned char *uuid,
char *uuidstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
#endif /* LIBVIRT_VIRUUID_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRVHBA_H
# define LIBVIRT_VIRVHBA_H
#pragma once
#include "internal.h"
@ -58,5 +57,3 @@ char *
virVHBAGetHostByFabricWWN(const char *sysfs_prefix,
const char *fabric_wwn)
ATTRIBUTE_NONNULL(2);
#endif /* LIBVIRT_VIRVHBA_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRVSOCK_H
# define LIBVIRT_VIRVSOCK_H
#pragma once
int
virVsockSetGuestCid(int fd,
@ -26,4 +25,3 @@ virVsockSetGuestCid(int fd,
int
virVsockAcquireGuestCid(int fd,
unsigned int *guest_cid);
#endif /* LIBVIRT_VIRVSOCK_H */

View File

@ -18,8 +18,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRXDRDEFS_H
# define LIBVIRT_VIRXDRDEFS_H
#pragma once
/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t
* and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
@ -39,5 +38,3 @@
#ifndef IXDR_GET_U_INT32
# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
#endif
#endif /* LIBVIRT_VIRXDRDEFS_H */