mirror of https://gitee.com/openkylin/libvirt.git
Remove virConnectPtr from virRaiseErrorFull
And from all related macros and functions.
This commit is contained in:
parent
b0d28307c8
commit
60d769a13a
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
|
||||
# define virCPUReportError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
|
||||
virReportErrorHelper(VIR_FROM_CPU, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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__, \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/*
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/*
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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, ...) \
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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__ */
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -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__)
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in New Issue