aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/conf/cpu_conf.c2
-rw-r--r--src/conf/domain_conf.c2
-rw-r--r--src/conf/domain_event.c2
-rw-r--r--src/conf/interface_conf.c2
-rw-r--r--src/conf/network_conf.c2
-rw-r--r--src/conf/node_device_conf.h2
-rw-r--r--src/conf/nwfilter_conf.h6
-rw-r--r--src/conf/secret_conf.h2
-rw-r--r--src/conf/storage_conf.h2
-rw-r--r--src/cpu/cpu.h2
-rw-r--r--src/datatypes.c2
-rw-r--r--src/esx/esx_private.h2
-rw-r--r--src/esx/esx_vi.h2
-rw-r--r--src/fdstream.c2
-rw-r--r--src/interface/netcf_driver.c2
-rw-r--r--src/internal.h3
-rw-r--r--src/libvirt-qemu.c4
-rw-r--r--src/libvirt.c26
-rw-r--r--src/libxl/libxl_conf.h2
-rw-r--r--src/lxc/lxc_conf.h2
-rw-r--r--src/lxc/veth.c2
-rw-r--r--src/network/bridge_driver.c2
-rw-r--r--src/nodeinfo.c2
-rw-r--r--src/openvz/openvz_conf.h2
-rw-r--r--src/phyp/phyp_driver.c2
-rw-r--r--src/qemu/qemu_conf.h2
-rw-r--r--src/remote/remote_driver.c11
-rw-r--r--src/security/security_manager.h2
-rw-r--r--src/test/test_driver.c2
-rw-r--r--src/uml/uml_conf.h2
-rw-r--r--src/util/command.c2
-rw-r--r--src/util/conf.c4
-rw-r--r--src/util/event_poll.c2
-rw-r--r--src/util/hooks.c2
-rw-r--r--src/util/hostusb.c2
-rw-r--r--src/util/interface.c2
-rw-r--r--src/util/iptables.c2
-rw-r--r--src/util/json.c2
-rw-r--r--src/util/macvtap.c2
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/pci.c2
-rw-r--r--src/util/sexpr.c4
-rw-r--r--src/util/stats_linux.c2
-rw-r--r--src/util/sysinfo.c2
-rw-r--r--src/util/util.c2
-rw-r--r--src/util/virterror.c14
-rw-r--r--src/util/virterror_internal.h13
-rw-r--r--src/util/xml.c2
-rw-r--r--src/vbox/vbox_driver.c2
-rw-r--r--src/vbox/vbox_tmpl.c2
-rw-r--r--src/vmware/vmware_conf.h2
-rw-r--r--src/vmx/vmx.c2
-rw-r--r--src/xen/block_stats.c57
-rw-r--r--src/xen/block_stats.h2
-rw-r--r--src/xen/xen_driver.c2
-rw-r--r--src/xen/xen_hypervisor.c6
-rw-r--r--src/xen/xen_inotify.c2
-rw-r--r--src/xen/xend_internal.c2
-rw-r--r--src/xen/xm_internal.c2
-rw-r--r--src/xen/xs_internal.c2
-rw-r--r--src/xenapi/xenapi_driver.c2
-rw-r--r--src/xenapi/xenapi_utils.c4
-rw-r--r--src/xenxs/xenxs_private.h2
63 files changed, 122 insertions, 132 deletions
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 7f03eaa8a..ad49916a9 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 c827ef564..6b733d474 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -415,7 +415,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__)
#define VIR_DOMAIN_XML_WRITE_FLAGS VIR_DOMAIN_XML_SECURE
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 5f086bd22..f0380d3bb 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 b24526fc2..2fa2fa060 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 dcab9de21..5738757cb 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -53,7 +53,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 fe0f2bffb..975abb334 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 9281f567b..12e2a5c38 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -647,9 +647,9 @@ void virNWFilterUnlockFilterUpdates(void);
int virNWFilterConfLayerInit(virHashIterator domUpdateCB);
void virNWFilterConfLayerShutdown(void);
-# define virNWFilterReportError(code, fmt...) \
- virReportErrorHelper(NULL, VIR_FROM_NWFILTER, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+# define virNWFilterReportError(code, fmt...) \
+ virReportErrorHelper(VIR_FROM_NWFILTER, code, __FILE__, \
+ __FUNCTION__, __LINE__, fmt)
typedef int (*virNWFilterRebuild)(virConnectPtr conn,
diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h
index 66294cee3..4b47c527d 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 9e1f534f8..271441a95 100644
--- a/src/conf/storage_conf.h
+++ b/src/conf/storage_conf.h
@@ -324,7 +324,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 76d0e8e2e..9f01f17cd 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 3edd1ff45..4c4cbd023 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_private.h b/src/esx/esx_private.h
index 1da255287..7ce237e53 100644
--- a/src/esx/esx_private.h
+++ b/src/esx/esx_private.h
@@ -29,7 +29,7 @@
# include "esx_vi.h"
# define ESX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
typedef struct _esxPrivate {
diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h
index d046bf98a..7d420da72 100644
--- a/src/esx/esx_vi.h
+++ b/src/esx/esx_vi.h
@@ -36,7 +36,7 @@
# 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/fdstream.c b/src/fdstream.c
index 3475bfdcb..d2325aea5 100644
--- a/src/fdstream.c
+++ b/src/fdstream.c
@@ -45,7 +45,7 @@
#define VIR_FROM_THIS VIR_FROM_STREAMS
#define streamsReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Tunnelled migration stream support */
diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index 0217b90b3..0190bf4e1 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/internal.h b/src/internal.h
index 4641fc154..0fa097c7d 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -232,8 +232,7 @@
do { \
unsigned long __unsuppflags = flags & ~(supported); \
if (__unsuppflags) { \
- virReportErrorHelper(NULL, \
- VIR_FROM_THIS, \
+ virReportErrorHelper(VIR_FROM_THIS, \
VIR_ERR_INVALID_ARG, \
__FILE__, \
__FUNCTION__, \
diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c
index d914ac87c..46727c843 100644
--- a/src/libvirt-qemu.c
+++ b/src/libvirt-qemu.c
@@ -29,11 +29,11 @@
#include "libvirt/libvirt-qemu.h"
#define virLibConnError(conn, error, info) \
- virReportErrorHelper(conn, VIR_FROM_NONE, error, NULL, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_NONE, error, NULL, __FUNCTION__, \
__LINE__, info)
#define virLibDomainError(domain, error, info) \
- virReportErrorHelper(NULL, VIR_FROM_DOM, error, NULL, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_DOM, error, NULL, __FUNCTION__, \
__LINE__, info)
int
diff --git a/src/libvirt.c b/src/libvirt.c
index 0da98859f..9e6784bca 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -469,37 +469,37 @@ 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__)
#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_NETWORK, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NETWORK, 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 virLibInterfaceError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__,\
+ virReportErrorHelper(VIR_FROM_INTERFACE, 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 virLibStreamError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_STREAMS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_STREAMS, 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__)
-#define virLibDomainSnapshotError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_DOMAIN_SNAPSHOT, code, __FILE__, \
+#define virLibDomainSnapshotError(code, ...) \
+ virReportErrorHelper(VIR_FROM_DOMAIN_SNAPSHOT, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
@@ -1056,7 +1056,7 @@ do_open (const char *name,
STRCASEEQ(ret->uri->scheme, "xenapi") ||
#endif
false)) {
- virReportErrorHelper(NULL, VIR_FROM_NONE, VIR_ERR_INVALID_ARG,
+ virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_INVALID_ARG,
__FILE__, __FUNCTION__, __LINE__,
_("libvirt was built without the '%s' driver"),
ret->uri->scheme);
diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index f2f0d8ac0..8c8778608 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -87,7 +87,7 @@ struct _libxlDomainObjPrivate {
# define libxlError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_LIBXL, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_LIBXL, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
virCapsPtr
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index f820d6dd6..4f1ead3e1 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -66,7 +66,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/lxc/veth.c b/src/lxc/veth.c
index 26bf4ff88..a00aa23da 100644
--- a/src/lxc/veth.c
+++ b/src/lxc/veth.c
@@ -27,7 +27,7 @@
#define VIR_FROM_THIS VIR_FROM_LXC
#define vethError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_LXC, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/* Functions */
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index f3952d4a2..8b5c1b613 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -70,7 +70,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 e1c9ad33a..facac150d 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -51,7 +51,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/openvz/openvz_conf.h b/src/openvz/openvz_conf.h
index 4673fa6b4..9a57551e7 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 ae2ed7009..8f8c3ba6d 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -65,7 +65,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 94918f6e2..f2bfa1eeb 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -146,7 +146,7 @@ struct _qemuDomainCmdlineDef {
# define QEMUD_MIGRATION_NUM_PORTS 64
# 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 b979f71c8..e30780cc9 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -242,7 +242,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);
@@ -8644,8 +8644,7 @@ remoteStreamHasError(virStreamPtr st) {
}
VIR_DEBUG0("Raising async error");
- virRaiseErrorFull(st->conn,
- __FILE__, __FUNCTION__, __LINE__,
+ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__,
privst->err.domain,
privst->err.code,
privst->err.level,
@@ -10908,8 +10907,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,
@@ -10921,8 +10919,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_manager.h b/src/security/security_manager.h
index 3f8880187..8d7c220b0 100644
--- a/src/security/security_manager.h
+++ b/src/security/security_manager.h
@@ -24,7 +24,7 @@
# define VIR_SECURITY_MANAGER_H__
# define virSecurityReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SECURITY, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_SECURITY, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 17f5ad9ae..0978214a6 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -117,7 +117,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 64df5f768..1105f8408 100644
--- a/src/uml/uml_conf.h
+++ b/src/uml/uml_conf.h
@@ -64,7 +64,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/command.c b/src/util/command.c
index 2e475a0ac..862a913c2 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -38,7 +38,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define virCommandError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
enum {
diff --git a/src/util/conf.c b/src/util/conf.c
index 71a344fef..4b8afb8f5 100644
--- a/src/util/conf.c
+++ b/src/util/conf.c
@@ -100,13 +100,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(NULL, NULL, 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(NULL, NULL, VIR_FROM_CONF, error, VIR_ERR_ERROR,
info, NULL, NULL,
ctxt ? ctxt->line : 0, 0,
format, info);
diff --git a/src/util/event_poll.c b/src/util/event_poll.c
index cd1ff4a0f..c5eedd3d4 100644
--- a/src/util/event_poll.c
+++ b/src/util/event_poll.c
@@ -44,7 +44,7 @@
#define VIR_FROM_THIS VIR_FROM_EVENT
#define virEventError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_EVENT, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_EVENT, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
static int virEventPollInterruptLocked(void);
diff --git a/src/util/hooks.c b/src/util/hooks.c
index 819c95cce..a409d773e 100644
--- a/src/util/hooks.c
+++ b/src/util/hooks.c
@@ -42,7 +42,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 SYSCONFDIR "/libvirt/hooks"
diff --git a/src/util/hostusb.c b/src/util/hostusb.c
index 2d6e41482..d5b478b70 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/interface.c b/src/util/interface.c
index fe58823be..5e1987adc 100644
--- a/src/util/interface.c
+++ b/src/util/interface.c
@@ -42,7 +42,7 @@
#include "files.h"
#define ifaceError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NET, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_NET, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#if __linux__
diff --git a/src/util/iptables.c b/src/util/iptables.c
index 59f5cc7a5..76d412c12 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
@@ -46,7 +46,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define iptablesError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
enum {
diff --git a/src/util/json.c b/src/util/json.c
index be47f6403..0daeae909 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 346eaf69c..a7af0cb78 100644
--- a/src/util/macvtap.c
+++ b/src/util/macvtap.c
@@ -63,7 +63,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/network.c b/src/util/network.c
index 33028aaaa..eb16e0c25 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -18,7 +18,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#define virSocketError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/*
diff --git a/src/util/pci.c b/src/util/pci.c
index ff950d155..945f32a9b 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -82,7 +82,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/sexpr.c b/src/util/sexpr.c
index da3d4b3b3..d6668f87f 100644
--- a/src/util/sexpr.c
+++ b/src/util/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/util/stats_linux.c b/src/util/stats_linux.c
index 539732007..173cdc5dc 100644
--- a/src/util/stats_linux.c
+++ b/src/util/stats_linux.c
@@ -30,7 +30,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/sysinfo.c b/src/util/sysinfo.c
index 2b764ae21..a865d2591 100644
--- a/src/util/sysinfo.c
+++ b/src/util/sysinfo.c
@@ -41,7 +41,7 @@
#define VIR_FROM_THIS VIR_FROM_SYSINFO
#define virSmbiosReportError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_SYSINFO, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_SYSINFO, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#define SYSINFO_SMBIOS_DECODER "dmidecode"
diff --git a/src/util/util.c b/src/util/util.c
index 526f51c0f..d4d2610b1 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -89,7 +89,7 @@ verify(sizeof(gid_t) <= sizeof (unsigned int) &&
#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 b7d8924a5..fbb4a4526 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -663,7 +663,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
@@ -682,8 +681,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,
@@ -1214,7 +1212,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
@@ -1226,8 +1223,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,
@@ -1248,7 +1244,7 @@ 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);
@@ -1324,7 +1320,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);
errno = save_errno;
@@ -1348,7 +1344,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 8f32f4169..df4b1d21b 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,22 @@ 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, \
+# define virRaiseError(dom, net, domain, code, level, \
str1, str2, str3, int1, int2, msg, ...) \
- virRaiseErrorFull(conn, __FILE__, __FUNCTION__, __LINE__, \
+ 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,
+void virReportErrorHelper(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);
+ ATTRIBUTE_FMT_PRINTF(6, 7);
void virReportSystemErrorFull(int domcode,
int theerrno,
diff --git a/src/util/xml.c b/src/util/xml.c
index 2c50e147b..d2989e2a6 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 9526ee41a..fc43b8c5a 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -66,7 +66,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 3ca34ddbd..8241d34e5 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -133,7 +133,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/vmware/vmware_conf.h b/src/vmware/vmware_conf.h
index e47ce62ca..b6d9d6067 100644
--- a/src/vmware/vmware_conf.h
+++ b/src/vmware/vmware_conf.h
@@ -31,7 +31,7 @@
# define PROGRAM_SENTINAL ((char *)0x1)
# define vmwareError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_VMWARE, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_VMWARE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
# define TYPE_PLAYER 0
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index b0d32188a..daeedc315 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -471,7 +471,7 @@ def->parallels[0]...
#define VIR_FROM_THIS VIR_FROM_NONE
#define VMX_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
#define VMX_BUILD_NAME_EXTRA(_suffix, _extra) \
diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
index 1918257ae..a28212c5d 100644
--- a/src/xen/block_stats.c
+++ b/src/xen/block_stats.c
@@ -42,8 +42,7 @@
* Handle a stats error.
*/
static void
-statsErrorFunc (virConnectPtr conn,
- virErrorNumber error, const char *func, const char *info,
+statsErrorFunc (virErrorNumber error, const char *func, const char *info,
int value)
{
char fullinfo[1000];
@@ -55,7 +54,7 @@ statsErrorFunc (virConnectPtr conn,
fullinfo[sizeof (fullinfo) - 1] = 0;
info = fullinfo;
}
- virRaiseError(conn, NULL, NULL, VIR_FROM_STATS_LINUX, error,
+ virRaiseError(NULL, NULL, VIR_FROM_STATS_LINUX, error,
VIR_ERR_ERROR,
errmsg, info, NULL, value, 0, errmsg, info,
value);
@@ -180,8 +179,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");
@@ -195,8 +194,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;
}
@@ -208,8 +207,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;
}
@@ -218,18 +217,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;
@@ -270,7 +269,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;
@@ -347,20 +346,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);
@@ -373,12 +372,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 ba113d74e..c94f6458f 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/xen_driver.c b/src/xen/xen_driver.c
index 9f4772213..2a07b7bd0 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -79,7 +79,7 @@ static int inside_daemon;
#endif
#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 8a9dae5af..9a5b41d1e 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -843,7 +843,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__)
/**
@@ -870,11 +870,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(NULL, NULL, 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(NULL, NULL, 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 5a997e601..d809c4548 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -46,7 +46,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 57422d3b2..b608a4371 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -68,7 +68,7 @@ virDomainXMLDevID(virDomainPtr domain,
int ref_len);
#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 9225808bc..db47a0206 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -121,7 +121,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 d9aad1f56..c318f6ce9 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -83,7 +83,7 @@ struct xenUnifiedDriver xenStoreDriver = {
};
#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_driver.c b/src/xenapi/xenapi_driver.c
index 60b23c718..3fbdcc654 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -44,7 +44,7 @@
#define VIR_FROM_THIS VIR_FROM_XENAPI
#define xenapiError(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
+ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
/*
diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
index f50610ad0..ae20bf779 100644
--- a/src/xenapi/xenapi_utils.c
+++ b/src/xenapi/xenapi_utils.c
@@ -386,11 +386,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/src/xenxs/xenxs_private.h b/src/xenxs/xenxs_private.h
index 9bf1223d2..60d27d22f 100644
--- a/src/xenxs/xenxs_private.h
+++ b/src/xenxs/xenxs_private.h
@@ -57,7 +57,7 @@
# define VIR_FROM_THIS VIR_FROM_NONE
# define XENXS_ERROR(code, ...) \
- virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_NONE, code, __FILE__, __FUNCTION__, \
__LINE__, __VA_ARGS__)
#endif /* __VIR_XENXS_PRIVATE_H__ */