And from all related macros and functions.
---
src/conf/cpu_conf.c | 2 +-
src/conf/domain_conf.c | 2 +-
src/conf/domain_event.c | 2 +-
src/conf/interface_conf.c | 2 +-
src/conf/network_conf.c | 2 +-
src/conf/node_device_conf.h | 2 +-
src/conf/nwfilter_conf.h | 2 +-
src/conf/secret_conf.h | 2 +-
src/conf/storage_conf.h | 2 +-
src/cpu/cpu.h | 2 +-
src/datatypes.c | 2 +-
src/esx/esx_device_monitor.c | 2 +-
src/esx/esx_driver.c | 2 +-
src/esx/esx_interface_driver.c | 2 +-
src/esx/esx_network_driver.c | 2 +-
src/esx/esx_secret_driver.c | 2 +-
src/esx/esx_storage_driver.c | 2 +-
src/esx/esx_util.c | 2 +-
src/esx/esx_vi.c | 2 +-
src/esx/esx_vi_methods.c | 2 +-
src/esx/esx_vi_types.c | 2 +-
src/esx/esx_vmx.c | 2 +-
src/interface/netcf_driver.c | 2 +-
src/libvirt.c | 20 ++++++------
src/lxc/lxc_conf.h | 2 +-
src/network/bridge_driver.c | 2 +-
src/nodeinfo.c | 2 +-
src/opennebula/one_conf.h | 2 +-
src/openvz/openvz_conf.h | 2 +-
src/phyp/phyp_driver.c | 2 +-
src/qemu/qemu_conf.h | 2 +-
src/remote/remote_driver.c | 27 +++++++----------
src/security/security_driver.h | 2 +-
src/test/test_driver.c | 2 +-
src/uml/uml_conf.h | 2 +-
src/util/conf.c | 4 +-
src/util/hooks.c | 2 +-
src/util/hostusb.c | 2 +-
src/util/json.c | 2 +-
src/util/macvtap.c | 2 +-
src/util/pci.c | 2 +-
src/util/stats_linux.c | 2 +-
src/util/util.c | 2 +-
src/util/virterror.c | 15 +++------
src/util/virterror_internal.h | 22 ++++++--------
src/util/xml.c | 2 +-
src/vbox/vbox_driver.c | 2 +-
src/vbox/vbox_tmpl.c | 2 +-
src/xen/block_stats.c | 60 +++++++++++++++++++--------------------
src/xen/block_stats.h | 2 +-
src/xen/proxy_internal.c | 6 ++--
src/xen/sexpr.c | 4 +-
src/xen/xen_driver.c | 2 +-
src/xen/xen_hypervisor.c | 6 ++--
src/xen/xen_inotify.c | 2 +-
src/xen/xend_internal.c | 2 +-
src/xen/xm_internal.c | 2 +-
src/xen/xs_internal.c | 2 +-
src/xenapi/xenapi_utils.c | 4 +-
tests/statstest.c | 2 +-
60 files changed, 126 insertions(+), 142 deletions(-)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index c51ac4e..1b5e362 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -32,7 +32,7 @@
#define VIR_FROM_THIS VIR_FROM_CPU
#define virCPUReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_CPU, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
VIR_ENUM_IMPL(virCPUMatch, VIR_CPU_MATCH_LAST,
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d6ba4f6..0864de3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -271,7 +271,7 @@ VIR_ENUM_IMPL(virDomainTimerMode, VIR_DOMAIN_TIMER_MODE_LAST,
"smpsafe");
#define virDomainReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_DOMAIN, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_DOMAIN, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef PROXY
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index fac5e49..615e1af 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -32,7 +32,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define eventReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
struct _virDomainMeta {
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index 920b090..76bd2af 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -46,7 +46,7 @@ virInterfaceDefDevFormat(virBufferPtr buf,
const virInterfaceDefPtr def, int level);
#define virInterfaceReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_INTERFACE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
static
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 1f3a44c..2b8bdc5 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -54,7 +54,7 @@ VIR_ENUM_IMPL(virNetworkForward,
"none", "nat", "route" )
#define virNetworkReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NETWORK, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets,
diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h
index fe0f2bf..975abb3 100644
--- a/src/conf/node_device_conf.h
+++ b/src/conf/node_device_conf.h
@@ -219,7 +219,7 @@ struct _virDeviceMonitorState {
};
# define virNodeDeviceReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NODEDEV, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NODEDEV, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
int virNodeDeviceHasCap(const virNodeDeviceObjPtr dev, const char *cap);
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 6c9dd4e..30d6c50 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -566,7 +566,7 @@ int virNWFilterConfLayerInit(virHashIterator domUpdateCB);
void virNWFilterConfLayerShutdown(void);
# define virNWFilterReportError(code, fmt...) \
- virReportErrorHelper(NULL, VIR_FROM_NWFILTER, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NWFILTER, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h
index 66294ce..4b47c52 100644
--- a/src/conf/secret_conf.h
+++ b/src/conf/secret_conf.h
@@ -27,7 +27,7 @@
# include "util.h"
# define virSecretReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SECRET, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_SECRET, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
VIR_ENUM_DECL(virSecretUsageType)
diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h
index 1c9ba04..38e4340 100644
--- a/src/conf/storage_conf.h
+++ b/src/conf/storage_conf.h
@@ -319,7 +319,7 @@ static inline int virStoragePoolObjIsActive(virStoragePoolObjPtr pool)
{
}
# define virStorageReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_STORAGE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h
index 1494a7f..e13dcb3 100644
--- a/src/cpu/cpu.h
+++ b/src/cpu/cpu.h
@@ -31,7 +31,7 @@
# define virCPUReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_CPU, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/datatypes.c b/src/datatypes.c
index ca20abf..009bab2 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -32,7 +32,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define virLibConnError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c
index 31724f7..4c013e1 100644
--- a/src/esx/esx_device_monitor.c
+++ b/src/esx/esx_device_monitor.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index a5b87df..f83e468 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -49,7 +49,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
static int esxDomainGetMaxVcpus(virDomainPtr domain);
diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
index b2fddbe..b369f76 100644
--- a/src/esx/esx_interface_driver.c
+++ b/src/esx/esx_interface_driver.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index e65b7eb..4526468 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c
index a29b546..315858c 100644
--- a/src/esx/esx_secret_driver.c
+++ b/src/esx/esx_secret_driver.c
@@ -38,7 +38,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 80ba645..b8d72a9 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index e8fd261..8d0123c 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
/* AI_ADDRCONFIG is missing on some systems. */
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 5ed1391..54aac4e 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -40,7 +40,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_VI_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
#define ESX_VI__SOAP__REQUEST_HEADER \
diff --git a/src/esx/esx_vi_methods.c b/src/esx/esx_vi_methods.c
index 87b7910..0313bae 100644
--- a/src/esx/esx_vi_methods.c
+++ b/src/esx/esx_vi_methods.c
@@ -34,7 +34,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_VI_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
#define ESX_VI__SOAP__REQUEST_HEADER \
diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index 500f8f1..e0b20a4 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -39,7 +39,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_VI_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index e4512b3..2a56760 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -422,7 +422,7 @@ def->parallels[0]...
#define VIR_FROM_THIS VIR_FROM_ESX
#define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index 708f1f8..dd36caf 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/netcf_driver.c
@@ -34,7 +34,7 @@
#define VIR_FROM_THIS VIR_FROM_INTERFACE
#define interfaceReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Main driver state */
diff --git a/src/libvirt.c b/src/libvirt.c
index 788b943..32da9c4 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -429,7 +429,7 @@ DllMain (HINSTANCE instance ATTRIBUTE_UNUSED,
#endif
#define virLibConnError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/**
@@ -448,40 +448,40 @@ virLibConnWarning(virErrorNumber error, const char *info)
return;
errmsg = virErrorMsg(error, info);
- virRaiseError(NULL, NULL, NULL, VIR_FROM_NONE, error, VIR_ERR_WARNING,
+ virRaiseError(VIR_FROM_NONE, error, VIR_ERR_WARNING,
errmsg, info, NULL, 0, 0, errmsg, info);
}
#define virLibDomainError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_DOM, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_DOM, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibNetworkError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NET, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NET, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibInterfaceError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_INTERFACE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibStoragePoolError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_STORAGE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibStorageVolError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_STORAGE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibNodeDeviceError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NODEDEV, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NODEDEV, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibSecretError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SECRET, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_SECRET, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virLibNWFilterError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NWFILTER, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NWFILTER, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/**
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index e4c2c52..6ac4e7f 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -65,7 +65,7 @@ int lxcLoadDriverConfig(lxc_driver_t *driver);
virCapsPtr lxcCapsInit(void);
# define lxcError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_LXC, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#endif /* LXC_CONF_H */
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 4eeaeed..e008135 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -64,7 +64,7 @@
#define VIR_FROM_THIS VIR_FROM_NETWORK
#define networkReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NETWORK, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Main driver state */
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 402a6b7..4e1b69f 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -52,7 +52,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define nodeReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#ifdef __linux__
diff --git a/src/opennebula/one_conf.h b/src/opennebula/one_conf.h
index c53090c..dc6eeab 100644
--- a/src/opennebula/one_conf.h
+++ b/src/opennebula/one_conf.h
@@ -48,7 +48,7 @@ int oneSubmitVM(one_driver_t* driver, virDomainObjPtr vm);
char* xmlOneTemplate(virDomainDefPtr def);
# define oneError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_ONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#endif /* ONE_CONF_H */
diff --git a/src/openvz/openvz_conf.h b/src/openvz/openvz_conf.h
index 50bcb5e..bd36534 100644
--- a/src/openvz/openvz_conf.h
+++ b/src/openvz/openvz_conf.h
@@ -34,7 +34,7 @@
# include "threads.h"
# define openvzError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_OPENVZ, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_OPENVZ, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 57ab00a..bc7a821 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -64,7 +64,7 @@
#define VIR_FROM_THIS VIR_FROM_PHYP
#define PHYP_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_PHYP, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_PHYP, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
/*
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 0b247d6..2315ad1 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -168,7 +168,7 @@ typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
# define QEMU_VIRTIO_SERIAL_PREFIX "virtio-serial"
# define qemuReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_QEMU, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index ea96deb..19a4c03 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -241,7 +241,7 @@ static int remoteAuthPolkit (virConnectPtr conn, struct private_data
*priv, int
#endif /* HAVE_POLKIT */
#define remoteError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_REMOTE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_REMOTE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain
domain);
@@ -6583,7 +6583,7 @@ static char *addrToString(struct sockaddr_storage *sa, socklen_t
salen)
host, sizeof(host),
port, sizeof(port),
NI_NUMERICHOST | NI_NUMERICSERV)) != 0) {
- virRaiseError (NULL, NULL, NULL, VIR_FROM_REMOTE,
+ virRaiseError (VIR_FROM_REMOTE,
VIR_ERR_UNKNOWN_HOST, VIR_ERR_ERROR,
NULL, NULL, NULL, 0, 0,
_("Cannot resolve address %d: %s"),
@@ -7930,8 +7930,7 @@ remoteStreamHasError(virStreamPtr st) {
}
VIR_WARN0("Raising async error");
- virRaiseErrorFull(st->conn,
- __FILE__, __FUNCTION__, __LINE__,
+ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,
privst->err.domain,
privst->err.code,
privst->err.level,
@@ -8883,8 +8882,7 @@ processCallDispatch(virConnectPtr conn, struct private_data *priv,
break;
default:
- virRaiseError (in_open ? NULL : conn,
- NULL, NULL, VIR_FROM_REMOTE,
+ virRaiseError (VIR_FROM_REMOTE,
VIR_ERR_RPC, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
_("got unexpected RPC call %d from server"),
hdr.proc);
@@ -8898,8 +8896,9 @@ processCallDispatch(virConnectPtr conn, struct private_data *priv,
static int
-processCallDispatchReply(virConnectPtr conn, struct private_data *priv,
- int in_open,
+processCallDispatchReply(virConnectPtr conn ATTRIBUTE_UNUSED,
+ struct private_data *priv,
+ int in_open ATTRIBUTE_UNUSED,
remote_message_header *hdr,
XDR *xdr) {
struct remote_thread_call *thecall;
@@ -8912,8 +8911,7 @@ processCallDispatchReply(virConnectPtr conn, struct private_data
*priv,
thecall = thecall->next;
if (!thecall) {
- virRaiseError (in_open ? NULL : conn,
- NULL, NULL, VIR_FROM_REMOTE,
+ virRaiseError (VIR_FROM_REMOTE,
VIR_ERR_RPC, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
_("no call waiting for reply with serial %d"),
hdr->serial);
@@ -8921,8 +8919,7 @@ processCallDispatchReply(virConnectPtr conn, struct private_data
*priv,
}
if (hdr->proc != thecall->proc_nr) {
- virRaiseError (in_open ? NULL : conn,
- NULL, NULL, VIR_FROM_REMOTE,
+ virRaiseError (VIR_FROM_REMOTE,
VIR_ERR_RPC, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
_("unknown procedure (received %x, expected %x)"),
hdr->proc, thecall->proc_nr);
@@ -9479,8 +9476,7 @@ cleanup:
* convert missing remote entry points into the unsupported
* feature error
*/
- virRaiseErrorFull(flags & REMOTE_CALL_IN_OPEN ? NULL : conn,
- __FILE__, __FUNCTION__, __LINE__,
+ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,
thiscall->err.domain,
VIR_ERR_NO_SUPPORT,
thiscall->err.level,
@@ -9492,8 +9488,7 @@ cleanup:
"%s", *thiscall->err.message);
rv = -1;
} else {
- virRaiseErrorFull(flags & REMOTE_CALL_IN_OPEN ? NULL : conn,
- __FILE__, __FUNCTION__, __LINE__,
+ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,
thiscall->err.domain,
thiscall->err.code,
thiscall->err.level,
diff --git a/src/security/security_driver.h b/src/security/security_driver.h
index 3de234a..7fd421a 100644
--- a/src/security/security_driver.h
+++ b/src/security/security_driver.h
@@ -89,7 +89,7 @@ int
virSecurityDriverVerify(virDomainDefPtr def);
# define virSecurityReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SECURITY, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_SECURITY, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Helpers */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index a63005d..2ceff0e 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -116,7 +116,7 @@ static const virNodeInfo defaultNodeInfo = {
#define testError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_TEST, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_TEST, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
static int testClose(virConnectPtr conn);
diff --git a/src/uml/uml_conf.h b/src/uml/uml_conf.h
index b33acc8..748c3a8 100644
--- a/src/uml/uml_conf.h
+++ b/src/uml/uml_conf.h
@@ -63,7 +63,7 @@ struct uml_driver {
# define umlReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_UML, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_UML, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
virCapsPtr umlCapsInit (void);
diff --git a/src/util/conf.c b/src/util/conf.c
index ae0459e..d985708 100644
--- a/src/util/conf.c
+++ b/src/util/conf.c
@@ -99,13 +99,13 @@ virConfError(virConfParserCtxtPtr ctxt,
/* Construct the string 'filename:line: info' if we have that. */
if (ctxt && ctxt->filename) {
- virRaiseError(NULL, NULL, NULL, VIR_FROM_CONF, error, VIR_ERR_ERROR,
+ virRaiseError(VIR_FROM_CONF, error, VIR_ERR_ERROR,
info, ctxt->filename, NULL,
ctxt->line, 0,
"%s:%d: %s", ctxt->filename, ctxt->line, info);
} else {
format = virErrorMsg(error, info);
- virRaiseError(NULL, NULL, NULL, VIR_FROM_CONF, error, VIR_ERR_ERROR,
+ virRaiseError(VIR_FROM_CONF, error, VIR_ERR_ERROR,
info, NULL, NULL,
ctxt ? ctxt->line : 0, 0,
format, info);
diff --git a/src/util/hooks.c b/src/util/hooks.c
index 755679d..a49ece0 100644
--- a/src/util/hooks.c
+++ b/src/util/hooks.c
@@ -40,7 +40,7 @@
#define VIR_FROM_THIS VIR_FROM_HOOK
#define virHookReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_HOOK, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_HOOK, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define LIBVIRT_HOOK_DIR SYSCONF_DIR "/libvirt/hooks"
diff --git a/src/util/hostusb.c b/src/util/hostusb.c
index 78b601f..f436605 100644
--- a/src/util/hostusb.c
+++ b/src/util/hostusb.c
@@ -55,7 +55,7 @@ struct _usbDevice {
#define VIR_FROM_THIS VIR_FROM_NONE
#define usbReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
static int usbSysReadFile(const char *f_name, const char *d_name,
diff --git a/src/util/json.c b/src/util/json.c
index f90594c..51cc6e5 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -37,7 +37,7 @@
/* XXX fixme */
#define VIR_FROM_THIS VIR_FROM_NONE
#define virJSONError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/util/macvtap.c b/src/util/macvtap.c
index 87c2800..4adb910 100644
--- a/src/util/macvtap.c
+++ b/src/util/macvtap.c
@@ -50,7 +50,7 @@
# define VIR_FROM_THIS VIR_FROM_NET
# define macvtapError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NET, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NET, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
# define MACVTAP_NAME_PREFIX "macvtap"
diff --git a/src/util/pci.c b/src/util/pci.c
index e8f985c..db3f344 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -76,7 +76,7 @@ struct _pciDeviceList {
#define VIR_FROM_THIS VIR_FROM_NONE
#define pciReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Specifications referenced in comments:
diff --git a/src/util/stats_linux.c b/src/util/stats_linux.c
index a12eb8c..da9649d 100644
--- a/src/util/stats_linux.c
+++ b/src/util/stats_linux.c
@@ -29,7 +29,7 @@
# define VIR_FROM_THIS VIR_FROM_STATS_LINUX
# define virStatsError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/util/util.c b/src/util/util.c
index 28a3c7e..cddf699 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -86,7 +86,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define virUtilError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Like read(), but restarts after EINTR */
diff --git a/src/util/virterror.c b/src/util/virterror.c
index 2537110..173ef3f 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -641,7 +641,6 @@ virDispatchError(virConnectPtr conn)
/**
* virRaiseErrorFull:
- * @conn: the connection to the hypervisor if available
* @filename: filename where error was raised
* @funcname: function name where error was raised
* @linenr: line number where error was raised
@@ -660,8 +659,7 @@ virDispatchError(virConnectPtr conn)
* immediately if a callback is found and store it for later handling.
*/
void
-virRaiseErrorFull(virConnectPtr conn ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED,
+virRaiseErrorFull(const char *filename ATTRIBUTE_UNUSED,
const char *funcname,
size_t linenr,
int domain,
@@ -1160,7 +1158,6 @@ virErrorMsg(virErrorNumber error, const char *info)
/**
* virReportErrorHelper:
*
- * @conn: the connection to the hypervisor if available
* @domcode: the virErrorDomain indicating where it's coming from
* @errcode: the virErrorNumber code for the error
* @filename: Source file error is dispatched from
@@ -1172,8 +1169,7 @@ virErrorMsg(virErrorNumber error, const char *info)
* Helper function to do most of the grunt work for individual driver
* ReportError
*/
-void virReportErrorHelper(virConnectPtr conn,
- int domcode,
+void virReportErrorHelper(int domcode,
int errcode,
const char *filename,
const char *funcname,
@@ -1193,11 +1189,10 @@ void virReportErrorHelper(virConnectPtr conn,
}
virerr = virErrorMsg(errcode, (errorMessage[0] ? errorMessage : NULL));
- virRaiseErrorFull(conn, filename, funcname, linenr,
+ virRaiseErrorFull(filename, funcname, linenr,
domcode, errcode, VIR_ERR_ERROR,
virerr, errorMessage, NULL,
-1, -1, virerr, errorMessage);
-
}
/**
@@ -1279,7 +1274,7 @@ void virReportSystemErrorFull(int domcode,
if (!msgDetail)
msgDetail = errnoDetail;
- virRaiseErrorFull(NULL, filename, funcname, linenr,
+ virRaiseErrorFull(filename, funcname, linenr,
domcode, VIR_ERR_SYSTEM_ERROR, VIR_ERR_ERROR,
msg, msgDetail, NULL, -1, -1, msg, msgDetail);
}
@@ -1302,7 +1297,7 @@ void virReportOOMErrorFull(int domcode,
const char *virerr;
virerr = virErrorMsg(VIR_ERR_NO_MEMORY, NULL);
- virRaiseErrorFull(NULL, filename, funcname, linenr,
+ virRaiseErrorFull(filename, funcname, linenr,
domcode, VIR_ERR_NO_MEMORY, VIR_ERR_ERROR,
virerr, NULL, NULL, -1, -1, virerr, NULL);
}
diff --git a/src/util/virterror_internal.h b/src/util/virterror_internal.h
index 601a884..067b83b 100644
--- a/src/util/virterror_internal.h
+++ b/src/util/virterror_internal.h
@@ -33,8 +33,7 @@ extern void *virUserData;
* *
************************************************************************/
int virErrorInitialize(void);
-void virRaiseErrorFull(virConnectPtr conn,
- const char *filename,
+void virRaiseErrorFull(const char *filename,
const char *funcname,
size_t linenr,
int domain,
@@ -46,22 +45,19 @@ void virRaiseErrorFull(virConnectPtr conn,
int int1,
int int2,
const char *fmt, ...)
- ATTRIBUTE_FMT_PRINTF(13, 14);
+ ATTRIBUTE_FMT_PRINTF(12, 13);
-/* Includes 'dom' and 'net' for compatbility, but they're ignored */
-# define virRaiseError(conn, dom, net, domain, code, level, \
- str1, str2, str3, int1, int2, msg, ...) \
- virRaiseErrorFull(conn, __FILE__, __FUNCTION__, __LINE__, \
+# define virRaiseError(domain, code, level, \
+ str1, str2, str3, int1, int2, msg, ...) \
+ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \
domain, code, level, str1, str2, str3, int1, int2, \
msg, __VA_ARGS__)
const char *virErrorMsg(virErrorNumber error, const char *info);
-void virReportErrorHelper(virConnectPtr conn, int domcode, int errcode,
- const char *filename ATTRIBUTE_UNUSED,
- const char *funcname ATTRIBUTE_UNUSED,
- size_t linenr ATTRIBUTE_UNUSED,
- const char *fmt, ...)
- ATTRIBUTE_FMT_PRINTF(7, 8);
+void virReportErrorHelper(int domcode, int errcode,
+ const char *filename, const char *funcname,
+ size_t linenr, const char *fmt, ...)
+ ATTRIBUTE_FMT_PRINTF(6, 7);
void virReportSystemErrorFull(int domcode,
int theerrno,
diff --git a/src/util/xml.c b/src/util/xml.c
index e2c2c6c..45cc65e 100644
--- a/src/util/xml.c
+++ b/src/util/xml.c
@@ -26,7 +26,7 @@
#define VIR_FROM_THIS VIR_FROM_XML
#define virGenericReportError(from, code, ...) \
- virReportErrorHelper(NULL, from, code, __FILE__, \
+ virReportErrorHelper(from, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virXMLError(code, ...) \
diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index 36e7315..788f6f6 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -59,7 +59,7 @@ static virDriver vboxDriverDummy;
#define VIR_FROM_THIS VIR_FROM_VBOX
#define vboxError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_VBOX, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_VBOX, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
int vboxRegister(void) {
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 1310c1a..89e51f5 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -125,7 +125,7 @@ typedef IMediumAttachment IHardDiskAttachment;
#endif /* VBOX_API_VERSION >= 3001 */
#define vboxError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_VBOX, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_VBOX, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define DEBUGPRUnichar(msg, strUtf16) \
diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
index 6e7a5c3..13f6fff 100644
--- a/src/xen/block_stats.c
+++ b/src/xen/block_stats.c
@@ -41,9 +41,8 @@
* Handle a stats error.
*/
static void
-statsErrorFunc (virConnectPtr conn,
- virErrorNumber error, const char *func, const char *info,
- int value)
+statsErrorFunc(virErrorNumber error, const char *func, const char *info,
+ int value)
{
char fullinfo[1000];
const char *errmsg;
@@ -54,8 +53,7 @@ statsErrorFunc (virConnectPtr conn,
fullinfo[sizeof (fullinfo) - 1] = 0;
info = fullinfo;
}
- virRaiseError(conn, NULL, NULL, VIR_FROM_STATS_LINUX, error,
- VIR_ERR_ERROR,
+ virRaiseError(VIR_FROM_STATS_LINUX, error, VIR_ERR_ERROR,
errmsg, info, NULL, value, 0, errmsg, info,
value);
}
@@ -166,8 +164,8 @@ check_bd_connected (xenUnifiedPrivatePtr priv, int device, int domid)
}
static int
-read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
- int device, int domid, struct _virDomainBlockStats *stats)
+read_bd_stats(xenUnifiedPrivatePtr priv,
+ int device, int domid, struct _virDomainBlockStats *stats)
{
stats->rd_req = read_bd_stat (device, domid, "rd_req");
stats->rd_bytes = read_bd_stat (device, domid, "rd_sect");
@@ -181,8 +179,8 @@ read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
if (stats->rd_req == -1 && stats->rd_bytes == -1 &&
stats->wr_req == -1 && stats->wr_bytes == -1 &&
stats->errs == -1) {
- statsErrorFunc (conn, VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
- "Failed to read any block statistics", domid);
+ statsErrorFunc(VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
+ "Failed to read any block statistics", domid);
return -1;
}
@@ -194,8 +192,8 @@ read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
stats->wr_req == 0 && stats->wr_bytes == 0 &&
stats->errs == 0 &&
!check_bd_connected (priv, device, domid)) {
- statsErrorFunc (conn, VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
- "Frontend block device not connected", domid);
+ statsErrorFunc(VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
+ "Frontend block device not connected", domid);
return -1;
}
@@ -204,18 +202,18 @@ read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
*/
if (stats->rd_bytes > 0) {
if (stats->rd_bytes >= ((unsigned long long)1)<<(63-9)) {
- statsErrorFunc (conn, VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
- "stats->rd_bytes would overflow 64 bit
counter",
- domid);
+ statsErrorFunc(VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
+ "stats->rd_bytes would overflow 64 bit counter",
+ domid);
return -1;
}
stats->rd_bytes *= 512;
}
if (stats->wr_bytes > 0) {
if (stats->wr_bytes >= ((unsigned long long)1)<<(63-9)) {
- statsErrorFunc (conn, VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
- "stats->wr_bytes would overflow 64 bit
counter",
- domid);
+ statsErrorFunc(VIR_ERR_INTERNAL_ERROR, __FUNCTION__,
+ "stats->wr_bytes would overflow 64 bit counter",
+ domid);
return -1;
}
stats->wr_bytes *= 512;
@@ -256,7 +254,7 @@ disk_re_match(const char *regex, const char *path, int *part)
}
int
-xenLinuxDomainDeviceID(virConnectPtr conn, int domid, const char *path)
+xenLinuxDomainDeviceID(int domid, const char *path)
{
int major, minor;
int part;
@@ -333,20 +331,20 @@ xenLinuxDomainDeviceID(virConnectPtr conn, int domid, const char
*path)
* beginning of the strings for better error messages
*/
else if (strlen(mod_path) >= 7 && STRPREFIX(mod_path,
"/dev/sd"))
- statsErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
- "invalid path, device names must be in the range sda[1-15] -
sdiv[1-15]",
- domid);
+ statsErrorFunc(VIR_ERR_INVALID_ARG, __FUNCTION__,
+ "invalid path, device names must be in the range sda[1-15] -
sdiv[1-15]",
+ domid);
else if (strlen(mod_path) >= 7 && STRPREFIX(mod_path,
"/dev/hd"))
- statsErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
- "invalid path, device names must be in the range hda[1-63] -
hdt[1-63]",
- domid);
+ statsErrorFunc(VIR_ERR_INVALID_ARG, __FUNCTION__,
+ "invalid path, device names must be in the range hda[1-63] -
hdt[1-63]",
+ domid);
else if (strlen(mod_path) >= 8 && STRPREFIX(mod_path,
"/dev/xvd"))
- statsErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
- "invalid path, device names must be in the range xvda[1-15]
- xvdiz[1-15]",
- domid);
+ statsErrorFunc(VIR_ERR_INVALID_ARG, __FUNCTION__,
+ "invalid path, device names must be in the range xvda[1-15] -
xvdiz[1-15]",
+ domid);
else
- statsErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
- "unsupported path, use xvdN, hdN, or sdN", domid);
+ statsErrorFunc(VIR_ERR_INVALID_ARG, __FUNCTION__,
+ "unsupported path, use xvdN, hdN, or sdN", domid);
VIR_FREE(mod_path);
@@ -359,12 +357,12 @@ xenLinuxDomainBlockStats (xenUnifiedPrivatePtr priv,
const char *path,
struct _virDomainBlockStats *stats)
{
- int device = xenLinuxDomainDeviceID(dom->conn, dom->id, path);
+ int device = xenLinuxDomainDeviceID(dom->id, path);
if (device < 0)
return -1;
- return read_bd_stats (dom->conn, priv, device, dom->id, stats);
+ return read_bd_stats(priv, device, dom->id, stats);
}
#endif /* __linux__ */
diff --git a/src/xen/block_stats.h b/src/xen/block_stats.h
index ba113d7..c94f645 100644
--- a/src/xen/block_stats.h
+++ b/src/xen/block_stats.h
@@ -19,7 +19,7 @@ extern int xenLinuxDomainBlockStats (xenUnifiedPrivatePtr priv,
virDomainPtr dom, const char *path,
struct _virDomainBlockStats *stats);
-extern int xenLinuxDomainDeviceID(virConnectPtr conn, int domid, const char *dev);
+extern int xenLinuxDomainDeviceID(int domid, const char *dev);
# endif /* __linux__ */
diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c
index db209d1..143b5c3 100644
--- a/src/xen/proxy_internal.c
+++ b/src/xen/proxy_internal.c
@@ -94,8 +94,8 @@ struct xenUnifiedDriver xenProxyDriver = {
************************************************************************/
#define virProxyError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_PROXY, code, __FILE__, \
- __FUNCTION__, __LINE__, __VA_ARGS__)
+ virReportErrorHelper(VIR_FROM_PROXY, code, __FILE__, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
* *
@@ -1023,7 +1023,7 @@ xenProxyDomainGetOSType(virDomainPtr domain)
return(NULL);
}
if ((ans.len == sizeof(virProxyPacket)) && (ans.data.arg < 0)) {
- virRaiseError (domain->conn, NULL, NULL, VIR_FROM_REMOTE,
+ virRaiseError (VIR_FROM_REMOTE,
VIR_ERR_OPERATION_FAILED, VIR_ERR_ERROR, NULL, NULL,
NULL, 0, 0, "%s", _("Cannot get domain
details"));
return(NULL);
diff --git a/src/xen/sexpr.c b/src/xen/sexpr.c
index 7e370db..a5b2a32 100644
--- a/src/xen/sexpr.c
+++ b/src/xen/sexpr.c
@@ -25,8 +25,8 @@
#define VIR_FROM_THIS VIR_FROM_SEXPR
#define virSexprError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SEXPR, code, __FILE__, \
- __FUNCTION__, __LINE__, __VA_ARGS__)
+ virReportErrorHelper(VIR_FROM_SEXPR, code, __FILE__, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/**
* sexpr_new:
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index fb2f7c7..557f004 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -73,7 +73,7 @@ static struct xenUnifiedDriver const * const
drivers[XEN_UNIFIED_NR_DRIVERS] = {
static int inside_daemon;
#define xenUnifiedError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_XEN, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XEN, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/**
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index ae17c60..40dbe2a 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -806,7 +806,7 @@ struct xenUnifiedDriver xenHypervisorDriver = {
#define virXenError(code, ...) \
if (in_init == 0) \
- virReportErrorHelper(NULL, VIR_FROM_XEN, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XEN, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef PROXY
@@ -835,11 +835,11 @@ virXenErrorFunc(virErrorNumber error, const char *func, const char
*info,
if (func != NULL) {
snprintf(fullinfo, 999, "%s: %s", func, info);
fullinfo[999] = 0;
- virRaiseError(NULL, NULL, NULL, VIR_FROM_XEN, error, VIR_ERR_ERROR,
+ virRaiseError(VIR_FROM_XEN, error, VIR_ERR_ERROR,
errmsg, fullinfo, NULL, value, 0, errmsg, fullinfo,
value);
} else {
- virRaiseError(NULL, NULL, NULL, VIR_FROM_XEN, error, VIR_ERR_ERROR,
+ virRaiseError(VIR_FROM_XEN, error, VIR_ERR_ERROR,
errmsg, info, NULL, value, 0, errmsg, info,
value);
}
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
index d24b20f..7b35f9d 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -45,7 +45,7 @@
#define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY
#define virXenInotifyError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_XEN_INOTIFY, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XEN_INOTIFY, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
struct xenUnifiedDriver xenInotifyDriver = {
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index c4e73b7..8c5a3fa 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -98,7 +98,7 @@ virDomainXMLDevID(virDomainPtr domain,
#endif
#define virXendError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_XEND, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XEND, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define virXendErrorInt(code, ival) \
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index d1265ba..e1e3f10 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -122,7 +122,7 @@ struct xenUnifiedDriver xenXMDriver = {
};
#define xenXMError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_XENXM, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XENXM, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef WITH_XEN_INOTIFY
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index 9296f25..0bd036b 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -89,7 +89,7 @@ struct xenUnifiedDriver xenStoreDriver = {
#endif /* ! PROXY */
#define virXenStoreError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_XENSTORE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
index 4eb17fa..90974b7 100644
--- a/src/xenapi/xenapi_utils.c
+++ b/src/xenapi/xenapi_utils.c
@@ -378,11 +378,11 @@ xenapiSessionErrorHandle(virConnectPtr conn, virErrorNumber errNum,
if (buf == NULL && priv != NULL && priv->session != NULL) {
char *ret = returnErrorFromSession(priv->session);
- virReportErrorHelper(conn, VIR_FROM_XENAPI, errNum, filename, func, lineno,
_("%s"), ret);
+ virReportErrorHelper(VIR_FROM_XENAPI, errNum, filename, func, lineno,
_("%s"), ret);
xen_session_clear_error(priv->session);
VIR_FREE(ret);
} else {
- virReportErrorHelper(conn, VIR_FROM_XENAPI, errNum, filename, func, lineno,
_("%s"), buf);
+ virReportErrorHelper(VIR_FROM_XENAPI, errNum, filename, func, lineno,
_("%s"), buf);
}
}
diff --git a/tests/statstest.c b/tests/statstest.c
index 5fad190..b6c9000 100644
--- a/tests/statstest.c
+++ b/tests/statstest.c
@@ -20,7 +20,7 @@ static void testQuietError(void *userData ATTRIBUTE_UNUSED,
#if __linux__ && WITH_XEN
static int testDevice(const char *path, int expect)
{
- int actual = xenLinuxDomainDeviceID(NULL, 1, path);
+ int actual = xenLinuxDomainDeviceID(1, path);
if (actual == expect) {
return 0;
--
1.6.3.3