mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 22:05:47 +00:00
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.
This commit is contained in:
parent
4dbed7d9c4
commit
2e56fb2bcc
@ -31,9 +31,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_CPU
|
#define VIR_FROM_THIS VIR_FROM_CPU
|
||||||
|
|
||||||
#define virCPUReportError(code, fmt...) \
|
#define virCPUReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
VIR_ENUM_IMPL(virCPUMatch, VIR_CPU_MATCH_LAST,
|
VIR_ENUM_IMPL(virCPUMatch, VIR_CPU_MATCH_LAST,
|
||||||
"minimum",
|
"minimum",
|
||||||
|
@ -238,9 +238,9 @@ VIR_ENUM_IMPL(virDomainClockOffset, VIR_DOMAIN_CLOCK_OFFSET_LAST,
|
|||||||
"variable",
|
"variable",
|
||||||
"timezone");
|
"timezone");
|
||||||
|
|
||||||
#define virDomainReportError(code, fmt...) \
|
#define virDomainReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_DOMAIN, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_DOMAIN, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifndef PROXY
|
#ifndef PROXY
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* domain_event.c: domain event queue processing helpers
|
* domain_event.c: domain event queue processing helpers
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2008 VirtualIron
|
* Copyright (C) 2008 VirtualIron
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -30,9 +31,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define eventReportError(conn, code, fmt...) \
|
#define eventReportError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,9 +45,9 @@ static int
|
|||||||
virInterfaceDefDevFormat(virBufferPtr buf,
|
virInterfaceDefDevFormat(virBufferPtr buf,
|
||||||
const virInterfaceDefPtr def, int level);
|
const virInterfaceDefPtr def, int level);
|
||||||
|
|
||||||
#define virInterfaceReportError(code, fmt...) \
|
#define virInterfaceReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_INTERFACE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
static
|
static
|
||||||
void virInterfaceIpDefFree(virInterfaceIpDefPtr def) {
|
void virInterfaceIpDefFree(virInterfaceIpDefPtr def) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* network_conf.c: network XML handling
|
* 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
|
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -53,9 +53,9 @@ VIR_ENUM_IMPL(virNetworkForward,
|
|||||||
VIR_NETWORK_FORWARD_LAST,
|
VIR_NETWORK_FORWARD_LAST,
|
||||||
"none", "nat", "route" )
|
"none", "nat", "route" )
|
||||||
|
|
||||||
#define virNetworkReportError(code, fmt...) \
|
#define virNetworkReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets,
|
virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets,
|
||||||
const unsigned char *uuid)
|
const unsigned char *uuid)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* node_device_conf.h: config handling for node devices
|
* 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 Virtual Iron Software, Inc.
|
||||||
* Copyright (C) 2008 David F. Lively
|
* Copyright (C) 2008 David F. Lively
|
||||||
*
|
*
|
||||||
@ -217,9 +218,9 @@ struct _virDeviceMonitorState {
|
|||||||
void *privateData; /* driver-specific private data */
|
void *privateData; /* driver-specific private data */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define virNodeDeviceReportError(code, fmt...) \
|
#define virNodeDeviceReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NODEDEV, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NODEDEV, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
int virNodeDeviceHasCap(const virNodeDeviceObjPtr dev, const char *cap);
|
int virNodeDeviceHasCap(const virNodeDeviceObjPtr dev, const char *cap);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* secret_conf.h: internal <secret> XML handling API
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -26,9 +26,9 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#define virSecretReportError(code, fmt...) \
|
#define virSecretReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_SECRET, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_SECRET, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
VIR_ENUM_DECL(virSecretUsageType)
|
VIR_ENUM_DECL(virSecretUsageType)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* storage_conf.h: config handling for storage driver
|
* 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
|
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -318,9 +318,9 @@ static inline int virStoragePoolObjIsActive(virStoragePoolObjPtr pool) {
|
|||||||
return pool->active;
|
return pool->active;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define virStorageReportError(code, fmt...) \
|
#define virStorageReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
||||||
const char *configDir,
|
const char *configDir,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* cpu.h: internal functions for CPU manipulation
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -30,9 +30,9 @@
|
|||||||
#include "cpu_x86_data.h"
|
#include "cpu_x86_data.h"
|
||||||
|
|
||||||
|
|
||||||
#define virCPUReportError(code, fmt...) \
|
#define virCPUReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_CPU, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
union cpuData {
|
union cpuData {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* datatypes.h: management of structs for public data types
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -31,9 +31,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define virLibConnError(conn, code, fmt...) \
|
#define virLibConnError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* esx_device_monitor.c: device monitor methods for managing VMware ESX
|
* esx_device_monitor.c: device monitor methods for managing VMware ESX
|
||||||
* host devices
|
* host devices
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#define VIR_FROM_THIS VIR_FROM_ESX
|
||||||
|
|
||||||
#define ESX_ERROR(code, fmt...) \
|
#define ESX_ERROR(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
static int esxDomainGetMaxVcpus(virDomainPtr domain);
|
static int esxDomainGetMaxVcpus(virDomainPtr domain);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* esx_interface_driver.h: interface driver methods for managing VMware ESX
|
* esx_interface_driver.h: interface driver methods for managing VMware ESX
|
||||||
* host interfaces
|
* host interfaces
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* esx_network_driver.c: network driver methods for managing VMware ESX
|
* esx_network_driver.c: network driver methods for managing VMware ESX
|
||||||
* host networks
|
* host networks
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_secret_driver.c: secret driver methods for VMware ESX secret manipulation
|
* 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>
|
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -36,9 +37,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* esx_storage_driver.c: storage driver methods for managing VMware ESX
|
* esx_storage_driver.c: storage driver methods for managing VMware ESX
|
||||||
* host storage
|
* host storage
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
* Copyright (C) 2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_util.c: utility methods for the VMware ESX driver
|
* 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 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
* Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
|
* Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
|
||||||
*
|
*
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#define VIR_FROM_THIS VIR_FROM_ESX
|
||||||
|
|
||||||
#define ESX_ERROR(code, fmt...) \
|
#define ESX_ERROR(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* AI_ADDRCONFIG is missing on some systems. */
|
/* AI_ADDRCONFIG is missing on some systems. */
|
||||||
#ifndef AI_ADDRCONFIG
|
#ifndef AI_ADDRCONFIG
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_vi.c: client for the VMware VI API 2.5 to manage ESX hosts
|
* 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>
|
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -38,9 +39,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define ESX_VI__SOAP__REQUEST_HEADER \
|
#define ESX_VI__SOAP__REQUEST_HEADER \
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_vi_methods.c: client for the VMware VI API 2.5 to manage ESX hosts
|
* 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>
|
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -32,9 +33,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define ESX_VI__SOAP__REQUEST_HEADER \
|
#define ESX_VI__SOAP__REQUEST_HEADER \
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_vi_types.c: client for the VMware VI API 2.5 to manage ESX hosts
|
* 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>
|
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_ESX
|
#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__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_vmx.c: VMX related methods for the VMware ESX driver
|
* 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>
|
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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 VIR_FROM_THIS VIR_FROM_ESX
|
||||||
|
|
||||||
#define ESX_ERROR(code, fmt...) \
|
#define ESX_ERROR(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
virReportErrorHelper(NULL, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* interface_driver.c: backend driver methods to handle physical
|
* interface_driver.c: backend driver methods to handle physical
|
||||||
* interface configuration using the netcf library.
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -33,9 +33,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_INTERFACE
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_THIS, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* Main driver state */
|
/* Main driver state */
|
||||||
struct interface_driver
|
struct interface_driver
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* libvirt.c: Main interfaces for the libvirt library to handle virtualization
|
* libvirt.c: Main interfaces for the libvirt library to handle virtualization
|
||||||
* domains from a process running in domain 0
|
* 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
|
* 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);
|
errmsg, info, NULL, 0, 0, errmsg, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define virLibStreamError(conn, code, fmt...) \
|
#define virLibStreamError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virLibSecretError:
|
* virLibSecretError:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright IBM Corp. 2008
|
* Copyright IBM Corp. 2008
|
||||||
*
|
*
|
||||||
* lxc_conf.h: header file for linux container config functions
|
* lxc_conf.h: header file for linux container config functions
|
||||||
@ -63,8 +64,8 @@ struct __lxc_driver {
|
|||||||
int lxcLoadDriverConfig(lxc_driver_t *driver);
|
int lxcLoadDriverConfig(lxc_driver_t *driver);
|
||||||
virCapsPtr lxcCapsInit(void);
|
virCapsPtr lxcCapsInit(void);
|
||||||
|
|
||||||
#define lxcError(code, fmt...) \
|
#define lxcError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#endif /* LXC_CONF_H */
|
#endif /* LXC_CONF_H */
|
||||||
|
@ -63,9 +63,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NETWORK
|
#define VIR_FROM_THIS VIR_FROM_NETWORK
|
||||||
|
|
||||||
#define networkReportError(code, fmt...) \
|
#define networkReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NETWORK, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* Main driver state */
|
/* Main driver state */
|
||||||
struct network_driver {
|
struct network_driver {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* nodeinfo.c: Helper routines for OS specific node information
|
* 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
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -49,9 +49,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define nodeReportError(conn, code, fmt...) \
|
#define nodeReportError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#define CPUINFO_PATH "/proc/cpuinfo"
|
#define CPUINFO_PATH "/proc/cpuinfo"
|
||||||
|
@ -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)
|
* Complutense de Madrid (dsa-research.org)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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);
|
char* xmlOneTemplate(virDomainDefPtr def);
|
||||||
|
|
||||||
#define oneError(conn, dom, code, fmt...) \
|
#define oneError(conn, dom, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_ONE, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_ONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#endif /* ONE_CONF_H */
|
#endif /* ONE_CONF_H */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* openvz_config.h: config information for OpenVZ VPSs
|
* openvz_config.h: config information for OpenVZ VPSs
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2006, 2007 Binary Karma.
|
* Copyright (C) 2006, 2007 Binary Karma.
|
||||||
* Copyright (C) 2006 Shuveb Hussain
|
* Copyright (C) 2006 Shuveb Hussain
|
||||||
* Copyright (C) 2007 Anoop Joe Cyriac
|
* Copyright (C) 2007 Anoop Joe Cyriac
|
||||||
@ -34,9 +35,9 @@
|
|||||||
|
|
||||||
enum { OPENVZ_WARN, OPENVZ_ERR };
|
enum { OPENVZ_WARN, OPENVZ_ERR };
|
||||||
|
|
||||||
#define openvzError(conn, code, fmt...) \
|
#define openvzError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
/* OpenVZ commands - Replace with wrapper scripts later? */
|
/* OpenVZ commands - Replace with wrapper scripts later? */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright IBM Corp. 2009
|
* Copyright IBM Corp. 2009
|
||||||
*
|
*
|
||||||
* phyp_driver.c: ssh layer to access Power Hypervisors
|
* phyp_driver.c: ssh layer to access Power Hypervisors
|
||||||
@ -61,9 +62,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_PHYP
|
#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__, \
|
virReportErrorHelper(conn, VIR_FROM_PHYP, code, __FILE__, __FUNCTION__, \
|
||||||
__LINE__, fmt)
|
__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* URI: phyp://user@[hmc|ivm]/managed_system
|
* URI: phyp://user@[hmc|ivm]/managed_system
|
||||||
|
@ -161,9 +161,9 @@ typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
|
|||||||
#define QEMU_DRIVE_HOST_PREFIX "drive-"
|
#define QEMU_DRIVE_HOST_PREFIX "drive-"
|
||||||
#define QEMU_VIRTIO_SERIAL_PREFIX "virtio-serial"
|
#define QEMU_VIRTIO_SERIAL_PREFIX "virtio-serial"
|
||||||
|
|
||||||
#define qemuReportError(code, fmt...) \
|
#define qemuReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||||
|
@ -242,9 +242,9 @@ static int remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int
|
|||||||
#define error(conn, code, info) \
|
#define error(conn, code, info) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, "%s", info)
|
__FUNCTION__, __LINE__, "%s", info)
|
||||||
#define errorf(conn, code, fmt...) \
|
#define errorf(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__, \
|
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 virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
|
||||||
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
|
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
|
||||||
|
@ -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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -88,9 +88,9 @@ int virSecurityDriverStartup(virSecurityDriverPtr *drv,
|
|||||||
int
|
int
|
||||||
virSecurityDriverVerify(virDomainDefPtr def);
|
virSecurityDriverVerify(virDomainDefPtr def);
|
||||||
|
|
||||||
#define virSecurityReportError(code, fmt...) \
|
#define virSecurityReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_SECURITY, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_SECURITY, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* Helpers */
|
/* Helpers */
|
||||||
void virSecurityDriverInit(virSecurityDriverPtr drv);
|
void virSecurityDriverInit(virSecurityDriverPtr drv);
|
||||||
|
@ -115,9 +115,9 @@ static const virNodeInfo defaultNodeInfo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define testError(conn, code, fmt...) \
|
#define testError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_TEST, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_TEST, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
static int testClose(virConnectPtr conn);
|
static int testClose(virConnectPtr conn);
|
||||||
static void testDomainEventFlush(int timer, void *opaque);
|
static void testDomainEventFlush(int timer, void *opaque);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* config.h: VM configuration management
|
* 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
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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__, \
|
virReportErrorHelper(conn, VIR_FROM_UML, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
virCapsPtr umlCapsInit (void);
|
virCapsPtr umlCapsInit (void);
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ struct _usbDevice {
|
|||||||
/* For virReportOOMError() and virReportSystemError() */
|
/* For virReportOOMError() and virReportSystemError() */
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define usbReportError(code, fmt...) \
|
#define usbReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
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,
|
static int usbSysReadFile(const char *f_name, const char *d_name,
|
||||||
int base, unsigned *value)
|
int base, unsigned *value)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* json.c: JSON object parsing/formatting
|
* json.c: JSON object parsing/formatting
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Daniel P. Berrange
|
|
||||||
* Copyright (C) 2009-2010 Red Hat, Inc.
|
* Copyright (C) 2009-2010 Red Hat, Inc.
|
||||||
|
* Copyright (C) 2009 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -36,9 +36,9 @@
|
|||||||
|
|
||||||
/* XXX fixme */
|
/* XXX fixme */
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
#define virJSONError(code, fmt...) \
|
#define virJSONError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
typedef struct _virJSONParserState virJSONParserState;
|
typedef struct _virJSONParserState virJSONParserState;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2010 IBM Corporation
|
* Copyright (C) 2010 IBM Corporation
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -48,9 +49,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NET
|
#define VIR_FROM_THIS VIR_FROM_NET
|
||||||
|
|
||||||
#define ReportError(conn, code, fmt...) \
|
#define ReportError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_NET, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_NET, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define MACVTAP_NAME_PREFIX "macvtap"
|
#define MACVTAP_NAME_PREFIX "macvtap"
|
||||||
#define MACVTAP_NAME_PATTERN "macvtap%d"
|
#define MACVTAP_NAME_PATTERN "macvtap%d"
|
||||||
|
@ -75,9 +75,9 @@ struct _pciDeviceList {
|
|||||||
/* For virReportOOMError() and virReportSystemError() */
|
/* For virReportOOMError() and virReportSystemError() */
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define pciReportError(code, fmt...) \
|
#define pciReportError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* Specifications referenced in comments:
|
/* Specifications referenced in comments:
|
||||||
* PCI30 - PCI Local Bus Specification 3.0
|
* PCI30 - PCI Local Bus Specification 3.0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Linux block and network stats.
|
* 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
|
* See COPYING.LIB for the License of this software
|
||||||
*
|
*
|
||||||
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_STATS_LINUX
|
#define VIR_FROM_THIS VIR_FROM_STATS_LINUX
|
||||||
|
|
||||||
#define virStatsError(code, fmt...) \
|
#define virStatsError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
/*-------------------- interface stats --------------------*/
|
/*-------------------- interface stats --------------------*/
|
||||||
|
@ -85,9 +85,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
#define virUtilError(code, fmt...) \
|
#define virUtilError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/* Like read(), but restarts after EINTR */
|
/* Like read(), but restarts after EINTR */
|
||||||
int saferead(int fd, void *buf, size_t count)
|
int saferead(int fd, void *buf, size_t count)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* xml.c: XML based interfaces for the libvir library
|
* 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
|
* See COPYING.LIB for the License of this software
|
||||||
*
|
*
|
||||||
@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_XML
|
#define VIR_FROM_THIS VIR_FROM_XML
|
||||||
|
|
||||||
#define virXMLError(code, fmt...) \
|
#define virXMLError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_XML, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_XML, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of a free software library; you can redistribute
|
* 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 VIR_FROM_THIS VIR_FROM_VBOX
|
||||||
|
|
||||||
#define vboxError(conn, code, fmt...) \
|
#define vboxError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
int vboxRegister(void) {
|
int vboxRegister(void) {
|
||||||
virDriverPtr driver;
|
virDriverPtr driver;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of a free software library; you can redistribute
|
* This file is part of a free software library; you can redistribute
|
||||||
@ -123,9 +124,9 @@ typedef IMediumAttachment IHardDiskAttachment;
|
|||||||
|
|
||||||
#endif /* VBOX_API_VERSION >= 3001 */
|
#endif /* VBOX_API_VERSION >= 3001 */
|
||||||
|
|
||||||
#define vboxError(conn, code, fmt...) \
|
#define vboxError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define DEBUGPRUnichar(msg, strUtf16) \
|
#define DEBUGPRUnichar(msg, strUtf16) \
|
||||||
if (strUtf16) {\
|
if (strUtf16) {\
|
||||||
|
@ -92,9 +92,9 @@ struct xenUnifiedDriver xenProxyDriver = {
|
|||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#define virProxyError(conn, code, fmt...) \
|
#define virProxyError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_PROXY, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_PROXY, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* sexpr.c : S-Expression routines to communicate with the Xen Daemon
|
* sexpr.c : S-Expression routines to communicate with the Xen Daemon
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
*
|
* Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
|
||||||
* Anthony Liguori <aliguori@us.ibm.com>
|
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
* 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
|
* 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 VIR_FROM_THIS VIR_FROM_SEXPR
|
||||||
|
|
||||||
#define virSexprError(code, fmt...) \
|
#define virSexprError(code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_SEXPR, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_SEXPR, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sexpr_new:
|
* sexpr_new:
|
||||||
|
@ -72,9 +72,9 @@ static struct xenUnifiedDriver const * const drivers[XEN_UNIFIED_NR_DRIVERS] = {
|
|||||||
|
|
||||||
static int inside_daemon;
|
static int inside_daemon;
|
||||||
|
|
||||||
#define xenUnifiedError(conn, code, fmt...) \
|
#define xenUnifiedError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xenNumaInit:
|
* xenNumaInit:
|
||||||
|
@ -803,10 +803,10 @@ struct xenUnifiedDriver xenHypervisorDriver = {
|
|||||||
};
|
};
|
||||||
#endif /* !PROXY */
|
#endif /* !PROXY */
|
||||||
|
|
||||||
#define virXenError(conn, code, fmt...) \
|
#define virXenError(conn, code, ...) \
|
||||||
if (in_init == 0) \
|
if (in_init == 0) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_XEN, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifndef PROXY
|
#ifndef PROXY
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* /etc/xen
|
* /etc/xen
|
||||||
* /var/lib/xend/domains
|
* /var/lib/xend/domains
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2008 VirtualIron
|
* Copyright (C) 2008 VirtualIron
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -43,9 +44,9 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY
|
#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__, \
|
virReportErrorHelper(NULL, VIR_FROM_XEN_INOTIFY, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
struct xenUnifiedDriver xenInotifyDriver = {
|
struct xenUnifiedDriver xenInotifyDriver = {
|
||||||
xenInotifyOpen, /* open */
|
xenInotifyOpen, /* open */
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* xend_internal.c: access to Xen though the Xen Daemon interface
|
* xend_internal.c: access to Xen though the Xen Daemon interface
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
*
|
* Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
|
||||||
* Anthony Liguori <aliguori@us.ibm.com>
|
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
* 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
|
* Public License. See the file COPYING.LIB in the main directory of this
|
||||||
@ -99,9 +98,9 @@ virDomainXMLDevID(virDomainPtr domain,
|
|||||||
int ref_len);
|
int ref_len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define virXendError(conn, code, fmt...) \
|
#define virXendError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_XEND, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_XEND, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define virXendErrorInt(conn, code, ival) \
|
#define virXendErrorInt(conn, code, ival) \
|
||||||
virXendError(conn, code, "%d", ival)
|
virXendError(conn, code, "%d", ival)
|
||||||
|
@ -120,9 +120,9 @@ struct xenUnifiedDriver xenXMDriver = {
|
|||||||
NULL, /* domainSetSchedulerParameters */
|
NULL, /* domainSetSchedulerParameters */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define xenXMError(conn, code, fmt...) \
|
#define xenXMError(conn, code, ...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifndef WITH_XEN_INOTIFY
|
#ifndef WITH_XEN_INOTIFY
|
||||||
static int xenInotifyActive(virConnectPtr conn ATTRIBUTE_UNUSED)
|
static int xenInotifyActive(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||||
|
@ -87,9 +87,9 @@ struct xenUnifiedDriver xenStoreDriver = {
|
|||||||
|
|
||||||
#endif /* ! PROXY */
|
#endif /* ! PROXY */
|
||||||
|
|
||||||
#define virXenStoreError(conn, code, fmt...) \
|
#define virXenStoreError(conn, code, ...) \
|
||||||
virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
|
Loading…
Reference in New Issue
Block a user