conf: network: 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:17 -05:00 committed by Ján Tomko
parent b268e87319
commit 54c5224e75
7 changed files with 52 additions and 73 deletions

View File

@ -16,14 +16,13 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETDEV_BANDWIDTH_CONF_H
# define LIBVIRT_NETDEV_BANDWIDTH_CONF_H
#pragma once
# include "internal.h"
# include "virnetdevbandwidth.h"
# include "virbuffer.h"
# include "virxml.h"
# include "domain_conf.h"
#include "internal.h"
#include "virnetdevbandwidth.h"
#include "virbuffer.h"
#include "virxml.h"
#include "domain_conf.h"
int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth,
xmlNodePtr node,
@ -56,5 +55,3 @@ static inline bool virNetDevSupportBandwidth(virDomainNetType type)
}
return false;
}
#endif /* LIBVIRT_NETDEV_BANDWIDTH_CONF_H */

View File

@ -16,15 +16,12 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETDEV_VLAN_CONF_H
# define LIBVIRT_NETDEV_VLAN_CONF_H
#pragma once
# include "internal.h"
# include "virnetdevvlan.h"
# include "virbuffer.h"
# include "virxml.h"
#include "internal.h"
#include "virnetdevvlan.h"
#include "virbuffer.h"
#include "virxml.h"
int virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def);
int virNetDevVlanFormat(const virNetDevVlan *def, virBufferPtr buf);
#endif /* LIBVIRT_NETDEV_VLAN_CONF_H */

View File

@ -16,13 +16,12 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H
# define LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H
#pragma once
# include "internal.h"
# include "virnetdevvportprofile.h"
# include "virbuffer.h"
# include "virxml.h"
#include "internal.h"
#include "virnetdevvportprofile.h"
#include "virbuffer.h"
#include "virxml.h"
typedef enum {
/* generate random defaults for interfaceID/interfaceID
@ -43,6 +42,3 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags);
int
virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort,
virBufferPtr buf);
#endif /* LIBVIRT_NETDEV_VPORT_PROFILE_CONF_H */

View File

@ -19,28 +19,27 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETWORK_CONF_H
# define LIBVIRT_NETWORK_CONF_H
#pragma once
# define DNS_RECORD_LENGTH_SRV (512 - 30) /* Limit minus overhead as mentioned in RFC-2782 */
#define DNS_RECORD_LENGTH_SRV (512 - 30) /* Limit minus overhead as mentioned in RFC-2782 */
# include <libxml/parser.h>
# include <libxml/tree.h>
# include <libxml/xpath.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
# include "internal.h"
# include "virthread.h"
# include "virsocketaddr.h"
# include "virnetdevbandwidth.h"
# include "virnetdevvportprofile.h"
# include "virnetdevvlan.h"
# include "virmacaddr.h"
# include "device_conf.h"
# include "virbitmap.h"
# include "networkcommon_conf.h"
# include "virobject.h"
# include "virmacmap.h"
# include "virenum.h"
#include "internal.h"
#include "virthread.h"
#include "virsocketaddr.h"
#include "virnetdevbandwidth.h"
#include "virnetdevvportprofile.h"
#include "virnetdevvlan.h"
#include "virmacaddr.h"
#include "device_conf.h"
#include "virbitmap.h"
#include "networkcommon_conf.h"
#include "virobject.h"
#include "virmacmap.h"
#include "virenum.h"
typedef enum {
VIR_NETWORK_FORWARD_NONE = 0,
@ -358,19 +357,19 @@ virNetworkSetBridgeMacAddr(virNetworkDefPtr def);
VIR_ENUM_DECL(virNetworkForward);
# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \
#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE \
(VIR_CONNECT_LIST_NETWORKS_ACTIVE | \
VIR_CONNECT_LIST_NETWORKS_INACTIVE)
# define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \
#define VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT \
(VIR_CONNECT_LIST_NETWORKS_PERSISTENT | \
VIR_CONNECT_LIST_NETWORKS_TRANSIENT)
# define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \
#define VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART \
(VIR_CONNECT_LIST_NETWORKS_AUTOSTART | \
VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART)
# define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \
#define VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL \
(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE | \
VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT | \
VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART)
@ -385,4 +384,3 @@ virNetworkDefUpdateSection(virNetworkDefPtr def,
unsigned int flags); /* virNetworkUpdateFlags */
VIR_ENUM_DECL(virNetworkTaint);
#endif /* LIBVIRT_NETWORK_CONF_H */

View File

@ -19,12 +19,11 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETWORK_EVENT_H
# define LIBVIRT_NETWORK_EVENT_H
#pragma once
# include "internal.h"
# include "object_event.h"
# include "object_event_private.h"
#include "internal.h"
#include "object_event.h"
#include "object_event_private.h"
int
virNetworkEventStateRegisterID(virConnectPtr conn,
@ -55,5 +54,3 @@ virNetworkEventLifecycleNew(const char *name,
const unsigned char *uuid,
int type,
int detail);
#endif /* LIBVIRT_NETWORK_EVENT_H */

View File

@ -20,16 +20,15 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_NETWORKCOMMON_CONF_H
# define LIBVIRT_NETWORKCOMMON_CONF_H
#pragma once
# include <libxml/tree.h>
# include <libxml/xpath.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
# include "internal.h"
# include "virbuffer.h"
# include "virsocketaddr.h"
# include "virnetdevip.h"
#include "internal.h"
#include "virbuffer.h"
#include "virsocketaddr.h"
#include "virnetdevip.h"
virNetDevIPRoutePtr
virNetDevIPRouteCreate(const char *networkName,
@ -49,5 +48,3 @@ virNetDevIPRouteParseXML(const char *networkName,
int
virNetDevIPRouteFormat(virBufferPtr buf,
const virNetDevIPRoute *def);
#endif /* LIBVIRT_NETWORKCOMMON_CONF_H */

View File

@ -17,12 +17,11 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_VIRNETWORKOBJ_H
# define LIBVIRT_VIRNETWORKOBJ_H
#pragma once
# include "internal.h"
#include "internal.h"
# include "network_conf.h"
#include "network_conf.h"
typedef struct _virNetworkObj virNetworkObj;
typedef virNetworkObj *virNetworkObjPtr;
@ -220,5 +219,3 @@ virNetworkObjListNumOfNetworks(virNetworkObjListPtr nets,
void
virNetworkObjListPrune(virNetworkObjListPtr nets,
unsigned int flags);
#endif /* LIBVIRT_VIRNETWORKOBJ_H */