]> xenbits.xensource.com Git - libvirt.git/commitdiff
* include/libvirt/virterror.h src/openvz_conf.c src/openvz_driver.c
authorDaniel Veillard <veillard@redhat.com>
Tue, 20 Nov 2007 10:15:38 +0000 (10:15 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 20 Nov 2007 10:15:38 +0000 (10:15 +0000)
  src/stats_linux.c src/virterror.c src/xm_internal.c: patch from
  Saori Fukuta cleaning up various problems in the error reporting
  layers
Daniel

ChangeLog
include/libvirt/virterror.h
src/openvz_conf.c
src/openvz_driver.c
src/stats_linux.c
src/virterror.c
src/xm_internal.c

index e95007eec274c46775f158542543c7c816d75664..8a9e40b88c9dc7f78a959e7365dc465af20b5e25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Nov 20 11:06:28 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * include/libvirt/virterror.h src/openvz_conf.c src/openvz_driver.c
+         src/stats_linux.c src/virterror.c src/xm_internal.c: patch from
+         Saori Fukuta cleaning up various problems in the error reporting
+         layers
+
 Tue Nov 20 11:03:02 CET 2007 Daniel Veillard <veillard@redhat.com>
 
        * tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exiting
index 8e2701f47eaac9e2845304e7ea55819193ebd559..505c6d117b349fd02809205ab6f741e1357e400e 100644 (file)
@@ -52,6 +52,8 @@ typedef enum {
     VIR_FROM_TEST,     /* Error from test driver */
     VIR_FROM_REMOTE,   /* Error from remote driver */
     VIR_FROM_OPENVZ,    /* Error from OpenVZ driver */
+    VIR_FROM_XENXM,    /* Error at Xen XM layer */
+    VIR_FROM_LINUX,    /* Error in the Linux Stats code */
 } virErrorDomain;
 
 
index ed577608a34c38f9da3b0175d25aecec343e0df9..c9f8536c565e652eb0be991906844a3ca8b90ecc 100644 (file)
@@ -67,7 +67,7 @@ error (virConnectPtr conn, virErrorNumber code, const char *info)
     const char *errmsg;
 
     errmsg = __virErrorMsg (code, info);
-    __virRaiseError (conn, NULL, NULL, VIR_FROM_REMOTE,
+    __virRaiseError (conn, NULL, NULL, VIR_FROM_OPENVZ,
                      code, VIR_ERR_ERROR, errmsg, info, NULL, 0, 0,
                      errmsg, info);
 }
index 033b19614e30a09b3c016f1a3d82217e6aacf4f9..aa554f2f4d15330c703472c00c0544806da50acd 100644 (file)
@@ -138,7 +138,7 @@ error (virConnectPtr conn, virErrorNumber code, const char *info)
     const char *errmsg;
 
     errmsg = __virErrorMsg (code, info);
-    __virRaiseError (conn, NULL, NULL, VIR_FROM_REMOTE,
+    __virRaiseError (conn, NULL, NULL, VIR_FROM_OPENVZ,
                      code, VIR_ERR_ERROR, errmsg, info, NULL, 0, 0,
                      errmsg, info);
 }
index 9c7ed72e2e3a74bb7cdb4b06a284997ca2f75873..8c35eb5291d54a4657da5978426ad98bfe4bb962 100644 (file)
@@ -51,7 +51,7 @@ statsErrorFunc (virConnectPtr conn,
         fullinfo[sizeof (fullinfo) - 1] = 0;
         info = fullinfo;
     }
-    __virRaiseError(conn, NULL, NULL, VIR_FROM_XEN, error, VIR_ERR_ERROR,
+    __virRaiseError(conn, NULL, NULL, VIR_FROM_LINUX, error, VIR_ERR_ERROR,
                     errmsg, info, NULL, value, 0, errmsg, info,
                     value);
 }
index 01be142f2d874a91392ee9d90379e1e97752c1f9..a315cdedf7a67b6e42a0171eebdc006aac6abb57 100644 (file)
@@ -280,6 +280,25 @@ virDefaultErrorFunc(virErrorPtr err)
         case VIR_FROM_REMOTE:
             dom = "Remote ";
             break;
+        case VIR_FROM_SEXPR:
+            dom = "S-Expr ";
+            break;
+        case VIR_FROM_PROXY:
+            dom = "PROXY ";
+            break;
+        case VIR_FROM_CONF:
+            dom = "Config ";
+            break;
+        case VIR_FROM_OPENVZ:
+            dom = "OpenVZ ";
+            break;
+        case VIR_FROM_XENXM:
+            dom = "Xen XM ";
+            break;
+        case VIR_FROM_LINUX:
+            dom = "Linux Stats ";
+            break;
+
     }
     if ((err->dom != NULL) && (err->code != VIR_ERR_INVALID_DOMAIN)) {
         domain = err->dom->name;
index 426d7a7494fa775cd15d29b05a420076000b75a2..c01106756e1ac537b545a55d5d4015749b202675 100644 (file)
@@ -127,7 +127,7 @@ xenXMError(virConnectPtr conn, virErrorNumber error, const char *info)
         return;
 
     errmsg = __virErrorMsg(error, info);
-    __virRaiseError(conn, NULL, NULL, VIR_FROM_XEND, error, VIR_ERR_ERROR,
+    __virRaiseError(conn, NULL, NULL, VIR_FROM_XENXM, error, VIR_ERR_ERROR,
                     errmsg, info, NULL, 0, 0, errmsg, info);
 }