From 2e56fb2bccd4923abbe7e7a47ae6aceedf3aefa8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 1 Mar 2010 16:38:28 -0700 Subject: [PATCH] build: consistently use C99 varargs macros 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. --- src/conf/cpu_conf.c | 4 ++-- src/conf/domain_conf.c | 4 ++-- src/conf/domain_event.c | 5 +++-- src/conf/interface_conf.c | 4 ++-- src/conf/network_conf.c | 6 +++--- src/conf/node_device_conf.h | 5 +++-- src/conf/secret_conf.h | 6 +++--- src/conf/storage_conf.h | 6 +++--- src/cpu/cpu.h | 6 +++--- src/datatypes.c | 6 +++--- src/esx/esx_device_monitor.c | 5 +++-- src/esx/esx_driver.c | 4 ++-- src/esx/esx_interface_driver.c | 5 +++-- src/esx/esx_network_driver.c | 5 +++-- src/esx/esx_secret_driver.c | 5 +++-- src/esx/esx_storage_driver.c | 5 +++-- src/esx/esx_util.c | 5 +++-- src/esx/esx_vi.c | 5 +++-- src/esx/esx_vi_methods.c | 5 +++-- src/esx/esx_vi_types.c | 5 +++-- src/esx/esx_vmx.c | 5 +++-- src/interface/netcf_driver.c | 6 +++--- src/libvirt.c | 6 +++--- src/lxc/lxc_conf.h | 5 +++-- src/network/bridge_driver.c | 4 ++-- src/nodeinfo.c | 6 +++--- src/opennebula/one_conf.h | 8 +++++--- src/openvz/openvz_conf.h | 5 +++-- src/phyp/phyp_driver.c | 5 +++-- src/qemu/qemu_conf.h | 4 ++-- src/remote/remote_driver.c | 4 ++-- src/security/security_driver.h | 6 +++--- src/test/test_driver.c | 4 ++-- src/uml/uml_conf.h | 6 +++--- src/util/hostusb.c | 4 ++-- src/util/json.c | 6 +++--- src/util/macvtap.c | 5 +++-- src/util/pci.c | 4 ++-- src/util/stats_linux.c | 6 +++--- src/util/util.c | 4 ++-- src/util/xml.c | 6 +++--- src/vbox/vbox_driver.c | 5 +++-- src/vbox/vbox_tmpl.c | 5 +++-- src/xen/proxy_internal.c | 4 ++-- src/xen/sexpr.c | 9 ++++----- src/xen/xen_driver.c | 4 ++-- src/xen/xen_hypervisor.c | 6 +++--- src/xen/xen_inotify.c | 5 +++-- src/xen/xend_internal.c | 9 ++++----- src/xen/xm_internal.c | 4 ++-- src/xen/xs_internal.c | 4 ++-- 51 files changed, 142 insertions(+), 123 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index ed83188d81..612e376393 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -31,9 +31,9 @@ #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", diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index df1ec18e2f..96ba0b013d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -238,9 +238,9 @@ VIR_ENUM_IMPL(virDomainClockOffset, VIR_DOMAIN_CLOCK_OFFSET_LAST, "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 diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index b474b1c6c1..e791cabe61 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -1,6 +1,7 @@ /* * 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 @@ -30,9 +31,9 @@ #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__) /** diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index f60b36a9d0..30d07100c2 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -45,9 +45,9 @@ static int 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) { diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 6d3c3c06f2..39ebd62f99 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1,7 +1,7 @@ /* * 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 @@ -53,9 +53,9 @@ VIR_ENUM_IMPL(virNetworkForward, 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) diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index 3a5432c819..cbaad9bd1f 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -1,6 +1,7 @@ /* * 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 * @@ -217,9 +218,9 @@ struct _virDeviceMonitorState { 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); diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h index da00920e73..afcf8f188d 100644 --- a/src/conf/secret_conf.h +++ b/src/conf/secret_conf.h @@ -1,7 +1,7 @@ /* * secret_conf.h: internal 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 @@ -26,9 +26,9 @@ #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) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index c64398497b..5441c8e07d 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -1,7 +1,7 @@ /* * 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 @@ -318,9 +318,9 @@ static inline int virStoragePoolObjIsActive(virStoragePoolObjPtr pool) { 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, diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index c8d961db4e..4287ca3b58 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -1,7 +1,7 @@ /* * 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 @@ -30,9 +30,9 @@ #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 { diff --git a/src/datatypes.c b/src/datatypes.c index fa342e0009..01601d8caf 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -1,7 +1,7 @@ /* * 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 @@ -31,9 +31,9 @@ #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__) /************************************************************************ * * diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c index de67ebb986..78de0e0cfb 100644 --- a/src/esx/esx_device_monitor.c +++ b/src/esx/esx_device_monitor.c @@ -3,6 +3,7 @@ * esx_device_monitor.c: device monitor methods for managing VMware ESX * host devices * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -37,9 +38,9 @@ #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__) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 517cce48ab..0afbda47de 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -47,9 +47,9 @@ #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); diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c index 6e9d22476e..e3739f7e9d 100644 --- a/src/esx/esx_interface_driver.c +++ b/src/esx/esx_interface_driver.c @@ -3,6 +3,7 @@ * esx_interface_driver.h: interface driver methods for managing VMware ESX * host interfaces * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -37,9 +38,9 @@ #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__) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 1eeae444c9..dacc95bf3d 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -3,6 +3,7 @@ * esx_network_driver.c: network driver methods for managing VMware ESX * host networks * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -37,9 +38,9 @@ #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__) diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c index 7b24d0c519..07a178fa1b 100644 --- a/src/esx/esx_secret_driver.c +++ b/src/esx/esx_secret_driver.c @@ -2,6 +2,7 @@ /* * esx_secret_driver.c: secret driver methods for VMware ESX secret manipulation * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -36,9 +37,9 @@ #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__) diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c index d09831a147..b920f3b3c0 100644 --- a/src/esx/esx_storage_driver.c +++ b/src/esx/esx_storage_driver.c @@ -3,6 +3,7 @@ * esx_storage_driver.c: storage driver methods for managing VMware ESX * host storage * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -37,9 +38,9 @@ #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__) diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 5da8e97ca3..dcbd86c25c 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -2,6 +2,7 @@ /* * esx_util.c: utility methods for the VMware ESX driver * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2009 Matthias Bolte * Copyright (C) 2009 Maximilian Wilhelm * @@ -37,9 +38,9 @@ #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 diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 9edfcb4d53..8c8f1bc726 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -2,6 +2,7 @@ /* * 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 * * This library is free software; you can redistribute it and/or @@ -38,9 +39,9 @@ #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 \ "\n" \ diff --git a/src/esx/esx_vi_methods.c b/src/esx/esx_vi_methods.c index d3beb07fa3..05c7b4269c 100644 --- a/src/esx/esx_vi_methods.c +++ b/src/esx/esx_vi_methods.c @@ -2,6 +2,7 @@ /* * 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 * * This library is free software; you can redistribute it and/or @@ -32,9 +33,9 @@ #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 \ "\n" \ diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index c32bf33dce..958b901336 100644 --- a/src/esx/esx_vi_types.c +++ b/src/esx/esx_vi_types.c @@ -2,6 +2,7 @@ /* * 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 * * This library is free software; you can redistribute it and/or @@ -37,9 +38,9 @@ #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__) diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c index 2651ccbb3b..ba4c608180 100644 --- a/src/esx/esx_vmx.c +++ b/src/esx/esx_vmx.c @@ -2,6 +2,7 @@ /* * esx_vmx.c: VMX related methods for the VMware ESX driver * + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2009 Matthias Bolte * * This library is free software; you can redistribute it and/or @@ -420,9 +421,9 @@ def->parallels[0]... #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__) diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c index 7f4d43d231..e44156eb83 100644 --- a/src/interface/netcf_driver.c +++ b/src/interface/netcf_driver.c @@ -2,7 +2,7 @@ * 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 @@ -33,9 +33,9 @@ #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 diff --git a/src/libvirt.c b/src/libvirt.c index d9242bce98..7f7a28cbcd 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2,7 +2,7 @@ * 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 * @@ -618,9 +618,9 @@ virLibNodeDeviceError(virNodeDevicePtr dev, virErrorNumber error, 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: diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h index d0c5bb1328..5cdf673226 100644 --- a/src/lxc/lxc_conf.h +++ b/src/lxc/lxc_conf.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2010 Red Hat, Inc. * Copyright IBM Corp. 2008 * * lxc_conf.h: header file for linux container config functions @@ -63,8 +64,8 @@ struct __lxc_driver { 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 */ diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 44537074c2..83ab00eb2b 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -63,9 +63,9 @@ #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 { diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 2d44609199..4648be1f7d 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -1,7 +1,7 @@ /* * 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 @@ -49,9 +49,9 @@ #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" diff --git a/src/opennebula/one_conf.h b/src/opennebula/one_conf.h index bb01026234..5f24e2b930 100644 --- a/src/opennebula/one_conf.h +++ b/src/opennebula/one_conf.h @@ -1,5 +1,7 @@ /*----------------------------------------------------------------------------------*/ -/* 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 @@ -45,8 +47,8 @@ int oneSubmitVM(virConnectPtr conn ,one_driver_t* driver, virDomainObjPtr vm); 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 */ diff --git a/src/openvz/openvz_conf.h b/src/openvz/openvz_conf.h index c863a2a3f6..fc5966b1d4 100644 --- a/src/openvz/openvz_conf.h +++ b/src/openvz/openvz_conf.h @@ -1,6 +1,7 @@ /* * 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 @@ -34,9 +35,9 @@ 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? */ diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index d3c8c19c05..32c0a7a480 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -1,5 +1,6 @@ /* + * Copyright (C) 2010 Red Hat, Inc. * Copyright IBM Corp. 2009 * * phyp_driver.c: ssh layer to access Power Hypervisors @@ -61,9 +62,9 @@ #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 diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 1821252d62..1134f62cbd 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -161,9 +161,9 @@ typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr; #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, diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index b7b2e09fcb..fc25d1d746 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -242,9 +242,9 @@ static int remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int #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); diff --git a/src/security/security_driver.h b/src/security/security_driver.h index 15671b3601..1b434c434f 100644 --- a/src/security/security_driver.h +++ b/src/security/security_driver.h @@ -1,5 +1,5 @@ /* - * 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 @@ -88,9 +88,9 @@ int virSecurityDriverStartup(virSecurityDriverPtr *drv, 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); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 5807288a7a..7960812799 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -115,9 +115,9 @@ static const virNodeInfo defaultNodeInfo = { }; -#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); diff --git a/src/uml/uml_conf.h b/src/uml/uml_conf.h index c319396f5b..f3967ee50d 100644 --- a/src/uml/uml_conf.h +++ b/src/uml/uml_conf.h @@ -1,7 +1,7 @@ /* * 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 @@ -62,9 +62,9 @@ struct uml_driver { }; -#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); diff --git a/src/util/hostusb.c b/src/util/hostusb.c index afba325951..78b601f470 100644 --- a/src/util/hostusb.c +++ b/src/util/hostusb.c @@ -54,9 +54,9 @@ struct _usbDevice { /* 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) diff --git a/src/util/json.c b/src/util/json.c index 3abff581f5..e388287d97 100644 --- a/src/util/json.c +++ b/src/util/json.c @@ -1,8 +1,8 @@ /* * 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 @@ -36,9 +36,9 @@ /* 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; diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 8c29588961..3b526ce4ef 100644 --- a/src/util/macvtap.c +++ b/src/util/macvtap.c @@ -1,4 +1,5 @@ /* + * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 IBM Corporation * * This library is free software; you can redistribute it and/or @@ -48,9 +49,9 @@ #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" diff --git a/src/util/pci.c b/src/util/pci.c index b812241af8..c6b2072118 100644 --- a/src/util/pci.c +++ b/src/util/pci.c @@ -75,9 +75,9 @@ struct _pciDeviceList { /* 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 diff --git a/src/util/stats_linux.c b/src/util/stats_linux.c index 25f8d085c0..feb55899cb 100644 --- a/src/util/stats_linux.c +++ b/src/util/stats_linux.c @@ -1,7 +1,7 @@ /* * 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 * @@ -28,9 +28,9 @@ #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 --------------------*/ diff --git a/src/util/util.c b/src/util/util.c index 7a3a3c4233..360cc53ba7 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -85,9 +85,9 @@ #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) diff --git a/src/util/xml.c b/src/util/xml.c index 14c83453b1..9129d78e19 100644 --- a/src/util/xml.c +++ b/src/util/xml.c @@ -1,7 +1,7 @@ /* * 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 * @@ -25,9 +25,9 @@ #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__) /************************************************************************ diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index ef3eb4bcb7..632cb76b7b 100644 --- a/src/vbox/vbox_driver.c +++ b/src/vbox/vbox_driver.c @@ -3,6 +3,7 @@ */ /* + * 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 @@ -57,9 +58,9 @@ static virDriver vboxDriverDummy; #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; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index a649df8228..6ebf50c6b0 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -8,6 +8,7 @@ */ /* + * 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 @@ -123,9 +124,9 @@ typedef IMediumAttachment IHardDiskAttachment; #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) {\ diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c index be79d56955..0c00abca95 100644 --- a/src/xen/proxy_internal.c +++ b/src/xen/proxy_internal.c @@ -92,9 +92,9 @@ struct xenUnifiedDriver xenProxyDriver = { * * ************************************************************************/ -#define virProxyError(conn, code, fmt...) \ +#define virProxyError(conn, code, ...) \ virReportErrorHelper(conn, VIR_FROM_PROXY, code, __FILE__, \ - __FUNCTION__, __LINE__, fmt) + __FUNCTION__, __LINE__, __VA_ARGS__) /************************************************************************ * * diff --git a/src/xen/sexpr.c b/src/xen/sexpr.c index 840d3e5fab..7e370db35e 100644 --- a/src/xen/sexpr.c +++ b/src/xen/sexpr.c @@ -1,9 +1,8 @@ /* * sexpr.c : S-Expression routines to communicate with the Xen Daemon * - * Copyright (C) 2005 - * - * Anthony Liguori + * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2005 Anthony Liguori * * 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 @@ -25,9 +24,9 @@ #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: diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 0eb39275fc..a798e413b0 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -72,9 +72,9 @@ static struct xenUnifiedDriver const * const drivers[XEN_UNIFIED_NR_DRIVERS] = { 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: diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index ab8fbc38b3..fe49ac2013 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -803,10 +803,10 @@ struct xenUnifiedDriver xenHypervisorDriver = { }; #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 diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c index de91dc66da..ee24bc4aee 100644 --- a/src/xen/xen_inotify.c +++ b/src/xen/xen_inotify.c @@ -4,6 +4,7 @@ * /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 @@ -43,9 +44,9 @@ #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 */ diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 5f46e9f5be..cd7177b38e 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -1,9 +1,8 @@ /* * xend_internal.c: access to Xen though the Xen Daemon interface * - * Copyright (C) 2005 - * - * Anthony Liguori + * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2005 Anthony Liguori * * 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 @@ -99,9 +98,9 @@ virDomainXMLDevID(virDomainPtr domain, 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) diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 3710dcbf22..0973b43346 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -120,9 +120,9 @@ struct xenUnifiedDriver xenXMDriver = { 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) diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index c8402259c3..0c625654c4 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -87,9 +87,9 @@ struct xenUnifiedDriver xenStoreDriver = { #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__) /************************************************************************ * *