On 18.07.2012 20:40, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Update the ESX driver to use virReportError instead of
the ESX_ERROR & ESX_VI_ERROR custom macros
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
cfg.mk | 2 -
src/esx/esx_driver.c | 422 ++++++++++++++--------------
src/esx/esx_private.h | 4 -
src/esx/esx_storage_driver.c | 100 +++----
src/esx/esx_util.c | 74 ++---
src/esx/esx_vi.c | 626 +++++++++++++++++++++---------------------
src/esx/esx_vi.h | 7 -
src/esx/esx_vi_methods.c | 12 +-
src/esx/esx_vi_types.c | 216 +++++++--------
9 files changed, 725 insertions(+), 738 deletions(-)
ACK with this squashed in:
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 86b0c6d..b1b5d70 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -386,8 +386,8 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char
**content,
* small things such as VMX of VMDK metadata files.
*/
if (*length > INT32_MAX / 2) {
- ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Download length it too large"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Download length it too large"));
return -1;
}
diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index 5a53b42..9e67eff 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -1231,7 +1231,7 @@ int
esxVI_String_Deserialize(xmlNodePtr node, esxVI_String **string)
{
if (string == NULL || *string != NULL) {
- ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid
argument"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid
argument"));
return -1;
}
Michal