提交 c0abcca4 编写于 作者: P Peter Krempa

util: Don't include 'viralloc.h' into other header files

'viralloc.h' does not provide any type or macro which would be necessary
in headers. Prevent leakage of the inclusion.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a4bfc252
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# include "internal.h" # include "internal.h"
# include "domain_conf.h" # include "domain_conf.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef const char * (*virDomainCapsValToStr)(int value); typedef const char * (*virDomainCapsValToStr)(int value);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "virscsihost.h" #include "virscsihost.h"
#include "virstring.h" #include "virstring.h"
#include "virvhba.h" #include "virvhba.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_NODEDEV #define VIR_FROM_THIS VIR_FROM_NODEDEV
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "virerror.h" #include "virerror.h"
#include "virstring.h" #include "virstring.h"
#include "moment_conf.h" #include "moment_conf.h"
#include "viralloc.h"
/* FIXME: using virObject would allow us to not need this */ /* FIXME: using virObject would allow us to not need this */
#include "snapshot_conf.h" #include "snapshot_conf.h"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT #define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "virfile.h" #include "virfile.h"
#include "virbuffer.h" #include "virbuffer.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
# endif # endif
# include "lxc_conf.h" # include "lxc_conf.h"
# include "viralloc.h"
struct virLXCMeminfo { struct virLXCMeminfo {
unsigned long long memtotal; unsigned long long memtotal;
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "virjson.h" #include "virjson.h"
#include "virlog.h" #include "virlog.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# define LIBVIRT_QEMU_FIRMWARE_H # define LIBVIRT_QEMU_FIRMWARE_H
# include "domain_conf.h" # include "domain_conf.h"
# include "viralloc.h"
# include "qemu_conf.h" # include "qemu_conf.h"
# include "virautoclean.h" # include "virautoclean.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "virauth.h" #include "virauth.h"
#include "viralloc.h"
#include "virutil.h" #include "virutil.h"
#include "virlog.h" #include "virlog.h"
#include "datatypes.h" #include "datatypes.h"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "virlog.h" #include "virlog.h"
#include "virerror.h" #include "virerror.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
struct _virAuthConfig { struct _virAuthConfig {
virKeyFilePtr keyfile; virKeyFilePtr keyfile;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# define LIBVIRT_VIRAUTHCONFIG_H # define LIBVIRT_VIRAUTHCONFIG_H
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virAuthConfig virAuthConfig; typedef struct _virAuthConfig virAuthConfig;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <sys/types.h> #include <sys/types.h>
#include "virbitmap.h" #include "virbitmap.h"
#include "viralloc.h"
#include "virbuffer.h" #include "virbuffer.h"
#include "c-ctype.h" #include "c-ctype.h"
#include "count-one-bits.h" #include "count-one-bits.h"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# define LIBVIRT_VIRBITMAP_H # define LIBVIRT_VIRBITMAP_H
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# include <sys/types.h> # include <sys/types.h>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "virbuffer.h" #include "virbuffer.h"
#include "virerror.h" #include "virerror.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
# include <stdarg.h> # include <stdarg.h>
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "virstring.h" #include "virstring.h"
#include "virsystemd.h" #include "virsystemd.h"
#include "virerror.h" #include "virerror.h"
#include "viralloc.h"
VIR_LOG_INIT("util.cgroup"); VIR_LOG_INIT("util.cgroup");
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#define LIBVIRT_VIRCGROUPPRIV_H_ALLOW #define LIBVIRT_VIRCGROUPPRIV_H_ALLOW
#include "vircgrouppriv.h" #include "vircgrouppriv.h"
#include "viralloc.h"
#include "vircgroup.h" #include "vircgroup.h"
#include "vircgroupbackend.h" #include "vircgroupbackend.h"
#include "vircgroupv2.h" #include "vircgroupv2.h"
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#endif #endif
#define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW #define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
#include "viralloc.h"
#include "vircommandpriv.h" #include "vircommandpriv.h"
#include "virerror.h" #include "virerror.h"
#include "virutil.h" #include "virutil.h"
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
# include "internal.h" # include "internal.h"
# include "virbuffer.h" # include "virbuffer.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virCommand virCommand; typedef struct _virCommand virCommand;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h"
#include "virlog.h" #include "virlog.h"
#include "virthread.h" #include "virthread.h"
#include "virutil.h" #include "virutil.h"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# define LIBVIRT_VIRERROR_H # define LIBVIRT_VIRERROR_H
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# define VIR_ERROR_MAX_LENGTH 1024 # define VIR_ERROR_MAX_LENGTH 1024
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
#include "configmake.h" #include "configmake.h"
#include "intprops.h" #include "intprops.h"
#include "viralloc.h"
#include "vircommand.h" #include "vircommand.h"
#include "virerror.h" #include "virerror.h"
#include "virfile.h" #include "virfile.h"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
# include "internal.h" # include "internal.h"
# include "virbitmap.h" # include "virbitmap.h"
# include "virstoragefile.h" # include "virstoragefile.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef enum { typedef enum {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW #define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW
#include "virfirewallpriv.h" #include "virfirewallpriv.h"
#include "virfirewalld.h" #include "virfirewalld.h"
#include "viralloc.h"
#include "virerror.h" #include "virerror.h"
#include "virutil.h" #include "virutil.h"
#include "virstring.h" #include "virstring.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# define LIBVIRT_VIRFIREWALL_H # define LIBVIRT_VIRFIREWALL_H
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virFirewall virFirewall; typedef struct _virFirewall virFirewall;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "virfirewalld.h" #include "virfirewalld.h"
#define LIBVIRT_VIRFIREWALLDPRIV_H_ALLOW #define LIBVIRT_VIRFIREWALLDPRIV_H_ALLOW
#include "virfirewalldpriv.h" #include "virfirewalldpriv.h"
#include "viralloc.h"
#include "virerror.h" #include "virerror.h"
#include "virutil.h" #include "virutil.h"
#include "virlog.h" #include "virlog.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "virerror.h" #include "virerror.h"
#include "virhash.h" #include "virhash.h"
#include "viralloc.h"
#include "virlog.h" #include "virlog.h"
#include "virhashcode.h" #include "virhashcode.h"
#include "virrandom.h" #include "virrandom.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
# define LIBVIRT_VIRHASH_H # define LIBVIRT_VIRHASH_H
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
/* /*
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <config.h> #include <config.h>
#include "virjson.h" #include "virjson.h"
#include "viralloc.h"
#include "virerror.h" #include "virerror.h"
#include "virlog.h" #include "virlog.h"
#include "virstring.h" #include "virstring.h"
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
# include "internal.h" # include "internal.h"
# include "virbitmap.h" # include "virbitmap.h"
# include "viralloc.h"
# include "virbuffer.h" # include "virbuffer.h"
# include "virautoclean.h" # include "virautoclean.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "virmacaddr.h" #include "virmacaddr.h"
#include "virrandom.h" #include "virrandom.h"
#include "virutil.h" #include "virutil.h"
#include "viralloc.h"
static const unsigned char virMacAddrBroadcastAddrRaw[VIR_MAC_BUFLEN] = static const unsigned char virMacAddrBroadcastAddrRaw[VIR_MAC_BUFLEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# define LIBVIRT_VIRMACADDR_H # define LIBVIRT_VIRMACADDR_H
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# define VIR_MAC_BUFLEN 6 # define VIR_MAC_BUFLEN 6
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "virerror.h" #include "virerror.h"
#include "virfile.h" #include "virfile.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# include "internal.h" # include "internal.h"
# include "virobject.h" # include "virobject.h"
# include "virutil.h" # include "virutil.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef enum { typedef enum {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "dirname.h" #include "dirname.h"
#include "virnetdev.h" #include "virnetdev.h"
#include "viralloc.h"
#include "virnetlink.h" #include "virnetlink.h"
#include "virmacaddr.h" #include "virmacaddr.h"
#include "virfile.h" #include "virfile.h"
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# include "virmacaddr.h" # include "virmacaddr.h"
# include "virpci.h" # include "virpci.h"
# include "virnetdevvlan.h" # include "virnetdevvlan.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# ifdef HAVE_STRUCT_IFREQ # ifdef HAVE_STRUCT_IFREQ
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "virstring.h" #include "virstring.h"
#include "virutil.h" #include "virutil.h"
#include "vircommand.h" #include "vircommand.h"
#include "viralloc.h"
#if HAVE_GETIFADDRS #if HAVE_GETIFADDRS
# include <ifaddrs.h> # include <ifaddrs.h>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "internal.h" #include "internal.h"
#include "virerror.h" #include "virerror.h"
#include "virnetdevvlan.h" #include "virnetdevvlan.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
# include <virutil.h> # include <virutil.h>
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef enum { typedef enum {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "virthread.h" #include "virthread.h"
#include "virmacaddr.h" #include "virmacaddr.h"
#include "virerror.h" #include "virerror.h"
#include "viralloc.h"
#define VIR_FROM_THIS VIR_FROM_NET #define VIR_FROM_THIS VIR_FROM_NET
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# include "internal.h" # include "internal.h"
# include "virmacaddr.h" # include "virmacaddr.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# if defined(__linux__) && defined(HAVE_LIBNL) # if defined(__linux__) && defined(HAVE_LIBNL)
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "virkmod.h" #include "virkmod.h"
#include "virstring.h" #include "virstring.h"
#include "virutil.h" #include "virutil.h"
#include "viralloc.h"
VIR_LOG_INIT("util.pci"); VIR_LOG_INIT("util.pci");
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
# include "virmdev.h" # include "virmdev.h"
# include "virobject.h" # include "virobject.h"
# include "virutil.h" # include "virutil.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virPCIDevice virPCIDevice; typedef struct _virPCIDevice virPCIDevice;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "virfile.h" #include "virfile.h"
#include "virstring.h" #include "virstring.h"
#include "virtypedparam.h" #include "virtypedparam.h"
#include "viralloc.h"
VIR_LOG_INIT("util.perf"); VIR_LOG_INIT("util.perf");
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
# define LIBVIRT_VIRPERF_H # define LIBVIRT_VIRPERF_H
# include "virutil.h" # include "virutil.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
/* Some Intel processor families introduced some RDT (Resource Director /* Some Intel processor families introduced some RDT (Resource Director
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "virutil.h" #include "virutil.h"
#include "virstring.h" #include "virstring.h"
#include "virerror.h" #include "virerror.h"
#include "viralloc.h"
#define SYSFS_SCSI_DEVICES "/sys/bus/scsi/devices" #define SYSFS_SCSI_DEVICES "/sys/bus/scsi/devices"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# include "internal.h" # include "internal.h"
# include "virobject.h" # include "virobject.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virSCSIDevice virSCSIDevice; typedef struct _virSCSIDevice virSCSIDevice;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "virerror.h" #include "virerror.h"
#include "virfile.h" #include "virfile.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
/* For virReportOOMError() and virReportSystemError() */ /* For virReportOOMError() and virReportSystemError() */
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
# include "internal.h" # include "internal.h"
# include "virobject.h" # include "virobject.h"
# include "virutil.h" # include "virutil.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
typedef struct _virSCSIVHostDevice virSCSIVHostDevice; typedef struct _virSCSIVHostDevice virSCSIVHostDevice;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "virerror.h" #include "virerror.h"
#include "virstring.h" #include "virstring.h"
#include "virbuffer.h" #include "virbuffer.h"
#include "viralloc.h"
#include <netdb.h> #include <netdb.h>
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# endif # endif
# include "internal.h" # include "internal.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
/* On architectures which lack these limits, define them (ie. Cygwin). /* On architectures which lack these limits, define them (ie. Cygwin).
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# include <stdarg.h> # include <stdarg.h>
# include "internal.h" # include "internal.h"
# include "viralloc.h"
char **virStringSplitCount(const char *string, char **virStringSplitCount(const char *string,
const char *delim, const char *delim,
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "virerror.h" #include "virerror.h"
#include "virfile.h" #include "virfile.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#define USB_SYSFS "/sys/bus/usb" #define USB_SYSFS "/sys/bus/usb"
#define USB_ID_LEN 10 /* "1234 5678" */ #define USB_ID_LEN 10 /* "1234 5678" */
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# include "internal.h" # include "internal.h"
# include "virobject.h" # include "virobject.h"
# include "viralloc.h"
# include "virautoclean.h" # include "virautoclean.h"
# define USB_DEVFS "/dev/bus/usb/" # define USB_DEVFS "/dev/bus/usb/"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "virthread.h" #include "virthread.h"
#include "virhash.h" #include "virhash.h"
#include "virstring.h" #include "virstring.h"
#include "viralloc.h"
#include "qemusecuritytest.h" #include "qemusecuritytest.h"
#include "security/security_manager.h" #include "security/security_manager.h"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
# include "testutilslxc.h" # include "testutilslxc.h"
# include "virstring.h" # include "virstring.h"
# include "virfile.h" # include "virfile.h"
# include "viralloc.h"
static int (*real_open)(const char *path, int flags, ...); static int (*real_open)(const char *path, int flags, ...);
static FILE *(*real_fopen)(const char *path, const char *mode); static FILE *(*real_fopen)(const char *path, const char *mode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册