Prior to this patch, there was an inconsistent mix between GNU and C99.
For consistency, and potential portability to other compilers, stick
with the C99 vararg macro syntax.
* src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU
vararg macro syntax.
* src/conf/domain_conf.c (virDomainReportError): Likewise.
* src/conf/domain_event.c (eventReportError): Likewise.
* src/conf/interface_conf.c (virInterfaceReportError): Likewise.
* src/conf/network_conf.c (virNetworkReportError): Likewise.
* src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise.
* src/conf/secret_conf.h (virSecretReportError): Likewise.
* src/conf/storage_conf.h (virStorageReportError): Likewise.
* src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than
GNU vararg macro syntax.
* src/esx/esx_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_interface_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_network_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_secret_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_storage_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_util.c (ESX_ERROR): Likewise.
* src/esx/esx_vi.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vmx.c (ESX_ERROR): Likewise.
* src/util/hostusb.c (usbReportError): Use C99 rather than GNU
vararg macro syntax.
* src/util/json.c (virJSONError): Likewise.
* src/util/macvtap.c (ReportError): Likewise.
* src/util/pci.c (pciReportError): Likewise.
* src/util/stats_linux.c (virStatsError): Likewise.
* src/util/util.c (virUtilError): Likewise.
* src/util/xml.c (virXMLError): Likewise.
* src/xen/proxy_internal.c (virProxyError): Use C99 rather than
GNU vararg macro syntax.
* src/xen/sexpr.c (virSexprError): Likewise.
* src/xen/xen_driver.c (xenUnifiedError): Likewise.
* src/xen/xen_hypervisor.c (virXenError): Likewise.
* src/xen/xen_inotify.c (virXenInotifyError): Likewise.
* src/xen/xend_internal.c (virXendError): Likewise.
* src/xen/xm_internal.c (xenXMError): Likewise.
* src/xen/xs_internal.c (virXenStoreError): Likewise.
* src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU
vararg macro syntax.
* src/datatypes.c (virLibConnError): Likewise.
* src/interface/netcf_driver.c (interfaceReportError): Likewise.
* src/libvirt.c (virLibStreamError): Likewise.
* src/lxc/lxc_conf.h (lxcError): Likewise.
* src/network/bridge_driver.c (networkReportError): Likewise.
* src/nodeinfo.c (nodeReportError): Likewise.
* src/opennebula/one_conf.h (oneError): Likewise.
* src/openvz/openvz_conf.h (openvzError): Likewise.
* src/phyp/phyp_driver.c (PHYP_ERROR): Likewise.
* src/qemu/qemu_conf.h (qemuReportError): Likewise.
* src/remote/remote_driver.c (errorf): Likewise.
* src/security/security_driver.h (virSecurityReportError): Likewise.
* src/test/test_driver.c (testError): Likewise.
* src/uml/uml_conf.h (umlReportError): Likewise.
* src/vbox/vbox_driver.c (vboxError): Likewise.
* src/vbox/vbox_tmpl.c (vboxError): Likewise.
#define VIR_FROM_THIS VIR_FROM_CPU
-#define virCPUReportError(code, fmt...) \
+#define virCPUReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
VIR_ENUM_IMPL(virCPUMatch, VIR_CPU_MATCH_LAST,
"minimum",
"variable",
"timezone");
-#define virDomainReportError(code, fmt...) \
+#define virDomainReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_DOMAIN, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef PROXY
/*
* domain_event.c: domain event queue processing helpers
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2008 VirtualIron
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_NONE
-#define eventReportError(conn, code, fmt...) \
+#define eventReportError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/**
virInterfaceDefDevFormat(virBufferPtr buf,
const virInterfaceDefPtr def, int level);
-#define virInterfaceReportError(code, fmt...) \
+#define virInterfaceReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
static
void virInterfaceIpDefFree(virInterfaceIpDefPtr def) {
/*
* network_conf.c: network XML handling
*
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2010 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
VIR_NETWORK_FORWARD_LAST,
"none", "nat", "route" )
-#define virNetworkReportError(code, fmt...) \
+#define virNetworkReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets,
const unsigned char *uuid)
/*
* node_device_conf.h: config handling for node devices
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2008 Virtual Iron Software, Inc.
* Copyright (C) 2008 David F. Lively
*
void *privateData; /* driver-specific private data */
};
-#define virNodeDeviceReportError(code, fmt...) \
+#define virNodeDeviceReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NODEDEV, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
int virNodeDeviceHasCap(const virNodeDeviceObjPtr dev, const char *cap);
/*
* secret_conf.h: internal <secret> XML handling API
*
- * Copyright (C) 2009 Red Hat, Inc.
+ * Copyright (C) 2009-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "internal.h"
#include "util.h"
-#define virSecretReportError(code, fmt...) \
+#define virSecretReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_SECRET, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
VIR_ENUM_DECL(virSecretUsageType)
/*
* storage_conf.h: config handling for storage driver
*
- * Copyright (C) 2006-2008 Red Hat, Inc.
+ * Copyright (C) 2006-2008, 2010 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
return pool->active;
}
-#define virStorageReportError(code, fmt...) \
+#define virStorageReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
const char *configDir,
/*
* cpu.h: internal functions for CPU manipulation
*
- * Copyright (C) 2009--2010 Red Hat, Inc.
+ * Copyright (C) 2009-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "cpu_x86_data.h"
-#define virCPUReportError(code, fmt...) \
+#define virCPUReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
union cpuData {
/*
* datatypes.h: management of structs for public data types
*
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#define VIR_FROM_THIS VIR_FROM_NONE
-#define virLibConnError(conn, code, fmt...) \
+#define virLibConnError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
* *
* esx_device_monitor.c: device monitor methods for managing VMware ESX
* host devices
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(conn, code, fmt...) \
+#define ESX_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(code, fmt...) \
+#define ESX_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
static int esxDomainGetMaxVcpus(virDomainPtr domain);
* esx_interface_driver.h: interface driver methods for managing VMware ESX
* host interfaces
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(conn, code, fmt...) \
+#define ESX_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
* esx_network_driver.c: network driver methods for managing VMware ESX
* host networks
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(conn, code, fmt...) \
+#define ESX_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
/*
* esx_secret_driver.c: secret driver methods for VMware ESX secret manipulation
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(conn, code, fmt...) \
+#define ESX_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
* esx_storage_driver.c: storage driver methods for managing VMware ESX
* host storage
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(conn, code, fmt...) \
+#define ESX_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
/*
* esx_util.c: utility methods for the VMware ESX driver
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
* Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
*
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(code, fmt...) \
+#define ESX_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
/* AI_ADDRCONFIG is missing on some systems. */
#ifndef AI_ADDRCONFIG
/*
* esx_vi.c: client for the VMware VI API 2.5 to manage ESX hosts
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_VI_ERROR(code, fmt...) \
+#define ESX_VI_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
#define ESX_VI__SOAP__REQUEST_HEADER \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
/*
* esx_vi_methods.c: client for the VMware VI API 2.5 to manage ESX hosts
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_VI_ERROR(code, fmt...) \
+#define ESX_VI_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
#define ESX_VI__SOAP__REQUEST_HEADER \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
/*
* esx_vi_types.c: client for the VMware VI API 2.5 to manage ESX hosts
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_VI_ERROR(code, fmt...) \
+#define ESX_VI_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
/*
* esx_vmx.c: VMX related methods for the VMware ESX driver
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_ESX
-#define ESX_ERROR(code, fmt...) \
+#define ESX_ERROR(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
* interface_driver.c: backend driver methods to handle physical
* interface configuration using the netcf library.
*
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#define VIR_FROM_THIS VIR_FROM_INTERFACE
-#define interfaceReportError(conn, dom, net, code, fmt...) \
+#define interfaceReportError(conn, dom, net, code, ...) \
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* Main driver state */
struct interface_driver
* libvirt.c: Main interfaces for the libvirt library to handle virtualization
* domains from a process running in domain 0
*
- * Copyright (C) 2005,2006,2008,2009 Red Hat, Inc.
+ * Copyright (C) 2005-2006, 2008-2010 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
errmsg, info, NULL, 0, 0, errmsg, info);
}
-#define virLibStreamError(conn, code, fmt...) \
+#define virLibStreamError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/**
* virLibSecretError:
/*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
* lxc_conf.h: header file for linux container config functions
int lxcLoadDriverConfig(lxc_driver_t *driver);
virCapsPtr lxcCapsInit(void);
-#define lxcError(code, fmt...) \
+#define lxcError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#endif /* LXC_CONF_H */
#define VIR_FROM_THIS VIR_FROM_NETWORK
-#define networkReportError(code, fmt...) \
+#define networkReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* Main driver state */
struct network_driver {
/*
* nodeinfo.c: Helper routines for OS specific node information
*
- * Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
+ * Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_NONE
-#define nodeReportError(conn, code, fmt...) \
+#define nodeReportError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#ifdef __linux__
#define CPUINFO_PATH "/proc/cpuinfo"
/*----------------------------------------------------------------------------------*/
-/* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad
+/*
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright 2002-2009, Distributed Systems Architecture Group, Universidad
* Complutense de Madrid (dsa-research.org)
*
* This library is free software; you can redistribute it and/or
char* xmlOneTemplate(virDomainDefPtr def);
-#define oneError(conn, dom, code, fmt...) \
+#define oneError(conn, dom, code, ...) \
virReportErrorHelper(conn, VIR_FROM_ONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#endif /* ONE_CONF_H */
/*
* openvz_config.h: config information for OpenVZ VPSs
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2006, 2007 Binary Karma.
* Copyright (C) 2006 Shuveb Hussain
* Copyright (C) 2007 Anoop Joe Cyriac
enum { OPENVZ_WARN, OPENVZ_ERR };
-#define openvzError(conn, code, fmt...) \
+#define openvzError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* OpenVZ commands - Replace with wrapper scripts later? */
/*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright IBM Corp. 2009
*
* phyp_driver.c: ssh layer to access Power Hypervisors
#define VIR_FROM_THIS VIR_FROM_PHYP
-#define PHYP_ERROR(conn, code, fmt...) \
+#define PHYP_ERROR(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_PHYP, code, __FILE__, __FUNCTION__, \
- __LINE__, fmt)
+ __LINE__, __VA_ARGS__)
/*
* URI: phyp://user@[hmc|ivm]/managed_system
#define QEMU_DRIVE_HOST_PREFIX "drive-"
#define QEMU_VIRTIO_SERIAL_PREFIX "virtio-serial"
-#define qemuReportError(code, fmt...) \
+#define qemuReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
int qemudLoadDriverConfig(struct qemud_driver *driver,
#define error(conn, code, info) \
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__, \
__FUNCTION__, __LINE__, "%s", info)
-#define errorf(conn, code, fmt...) \
+#define errorf(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
/*
- * Copyright (C) 2008 Red Hat, Inc.
+ * Copyright (C) 2008, 2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
int
virSecurityDriverVerify(virDomainDefPtr def);
-#define virSecurityReportError(code, fmt...) \
+#define virSecurityReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_SECURITY, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* Helpers */
void virSecurityDriverInit(virSecurityDriverPtr drv);
};
-#define testError(conn, code, fmt...) \
+#define testError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_TEST, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
static int testClose(virConnectPtr conn);
static void testDomainEventFlush(int timer, void *opaque);
/*
* config.h: VM configuration management
*
- * Copyright (C) 2006, 2007 Red Hat, Inc.
+ * Copyright (C) 2006, 2007, 2010 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
};
-#define umlReportError(conn, dom, net, code, fmt...) \
+#define umlReportError(conn, dom, net, code, ...) \
virReportErrorHelper(conn, VIR_FROM_UML, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
virCapsPtr umlCapsInit (void);
/* For virReportOOMError() and virReportSystemError() */
#define VIR_FROM_THIS VIR_FROM_NONE
-#define usbReportError(code, fmt...) \
+#define usbReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
static int usbSysReadFile(const char *f_name, const char *d_name,
int base, unsigned *value)
/*
* json.c: JSON object parsing/formatting
*
- * Copyright (C) 2009 Daniel P. Berrange
* Copyright (C) 2009-2010 Red Hat, Inc.
+ * Copyright (C) 2009 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/* XXX fixme */
#define VIR_FROM_THIS VIR_FROM_NONE
-#define virJSONError(code, fmt...) \
+#define virJSONError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
typedef struct _virJSONParserState virJSONParserState;
/*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 IBM Corporation
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_NET
-#define ReportError(conn, code, fmt...) \
+#define ReportError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_NET, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#define MACVTAP_NAME_PREFIX "macvtap"
#define MACVTAP_NAME_PATTERN "macvtap%d"
/* For virReportOOMError() and virReportSystemError() */
#define VIR_FROM_THIS VIR_FROM_NONE
-#define pciReportError(code, fmt...) \
+#define pciReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* Specifications referenced in comments:
* PCI30 - PCI Local Bus Specification 3.0
/*
* Linux block and network stats.
*
- * Copyright (C) 2007-2009 Red Hat, Inc.
+ * Copyright (C) 2007-2010 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
#define VIR_FROM_THIS VIR_FROM_STATS_LINUX
-#define virStatsError(code, fmt...) \
+#define virStatsError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/*-------------------- interface stats --------------------*/
#define VIR_FROM_THIS VIR_FROM_NONE
-#define virUtilError(code, fmt...) \
+#define virUtilError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/* Like read(), but restarts after EINTR */
int saferead(int fd, void *buf, size_t count)
/*
* xml.c: XML based interfaces for the libvir library
*
- * Copyright (C) 2005, 2007-2009 Red Hat, Inc.
+ * Copyright (C) 2005, 2007-2010 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
#define VIR_FROM_THIS VIR_FROM_XML
-#define virXMLError(code, fmt...) \
+#define virXMLError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_XML, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
*/
/*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
*
* This file is part of a free software library; you can redistribute
#define VIR_FROM_THIS VIR_FROM_VBOX
-#define vboxError(conn, code, fmt...) \
+#define vboxError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
int vboxRegister(void) {
virDriverPtr driver;
*/
/*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
*
* This file is part of a free software library; you can redistribute
#endif /* VBOX_API_VERSION >= 3001 */
-#define vboxError(conn, code, fmt...) \
+#define vboxError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#define DEBUGPRUnichar(msg, strUtf16) \
if (strUtf16) {\
* *
************************************************************************/
-#define virProxyError(conn, code, fmt...) \
+#define virProxyError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_PROXY, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
* *
/*
* sexpr.c : S-Expression routines to communicate with the Xen Daemon
*
- * Copyright (C) 2005
- *
- * Anthony Liguori <aliguori@us.ibm.com>
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file COPYING.LIB in the main directory of this
#define VIR_FROM_THIS VIR_FROM_SEXPR
-#define virSexprError(code, fmt...) \
+#define virSexprError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_SEXPR, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/**
* sexpr_new:
static int inside_daemon;
-#define xenUnifiedError(conn, code, fmt...) \
+#define xenUnifiedError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/**
* xenNumaInit:
};
#endif /* !PROXY */
-#define virXenError(conn, code, fmt...) \
- if (in_init == 0) \
+#define virXenError(conn, code, ...) \
+ if (in_init == 0) \
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef PROXY
* /etc/xen
* /var/lib/xend/domains
*
+ * Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2008 VirtualIron
*
* This library is free software; you can redistribute it and/or
#define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY
-#define virXenInotifyError(conn, code, fmt...) \
+#define virXenInotifyError(conn, code, ...) \
virReportErrorHelper(NULL, VIR_FROM_XEN_INOTIFY, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
struct xenUnifiedDriver xenInotifyDriver = {
xenInotifyOpen, /* open */
/*
* xend_internal.c: access to Xen though the Xen Daemon interface
*
- * Copyright (C) 2005
- *
- * Anthony Liguori <aliguori@us.ibm.com>
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file COPYING.LIB in the main directory of this
int ref_len);
#endif
-#define virXendError(conn, code, fmt...) \
+#define virXendError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_XEND, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#define virXendErrorInt(conn, code, ival) \
virXendError(conn, code, "%d", ival)
NULL, /* domainSetSchedulerParameters */
};
-#define xenXMError(conn, code, fmt...) \
+#define xenXMError(conn, code, ...) \
virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
#ifndef WITH_XEN_INOTIFY
static int xenInotifyActive(virConnectPtr conn ATTRIBUTE_UNUSED)
#endif /* ! PROXY */
-#define virXenStoreError(conn, code, fmt...) \
+#define virXenStoreError(conn, code, ...) \
virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
- __FUNCTION__, __LINE__, fmt)
+ __FUNCTION__, __LINE__, __VA_ARGS__)
/************************************************************************
* *