Index: include/libvirt/virterror.h
===================================================================
RCS file: /data/cvs/libvirt/include/libvirt/virterror.h,v
retrieving revision 1.28
diff -u -p -r1.28 virterror.h
--- include/libvirt/virterror.h	19 Jul 2007 16:22:40 -0000	1.28
+++ include/libvirt/virterror.h	19 Nov 2007 02:16:29 -0000
@@ -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: src/openvz_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/openvz_conf.c,v
retrieving revision 1.6
diff -u -p -r1.6 openvz_conf.c
--- src/openvz_conf.c	3 Sep 2007 16:30:00 -0000	1.6
+++ src/openvz_conf.c	19 Nov 2007 02:18:05 -0000
@@ -67,7 +67,7 @@ error (virConnectPtr conn, virErrorNumbe
     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: src/openvz_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/openvz_driver.c,v
retrieving revision 1.8
diff -u -p -r1.8 openvz_driver.c
--- src/openvz_driver.c	30 Sep 2007 13:09:07 -0000	1.8
+++ src/openvz_driver.c	19 Nov 2007 02:18:05 -0000
@@ -138,7 +138,7 @@ error (virConnectPtr conn, virErrorNumbe
     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: src/stats_linux.c
===================================================================
RCS file: /data/cvs/libvirt/src/stats_linux.c,v
retrieving revision 1.4
diff -u -p -r1.4 stats_linux.c
--- src/stats_linux.c	17 Nov 2007 11:53:44 -0000	1.4
+++ src/stats_linux.c	19 Nov 2007 02:18:07 -0000
@@ -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: src/virterror.c
===================================================================
RCS file: /data/cvs/libvirt/src/virterror.c,v
retrieving revision 1.29
diff -u -p -r1.29 virterror.c
--- src/virterror.c	13 Jul 2007 08:26:58 -0000	1.29
+++ src/virterror.c	19 Nov 2007 02:18:08 -0000
@@ -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: src/xm_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xm_internal.c,v
retrieving revision 1.44
diff -u -p -r1.44 xm_internal.c
--- src/xm_internal.c	14 Nov 2007 11:40:57 -0000	1.44
+++ src/xm_internal.c	19 Nov 2007 02:18:09 -0000
@@ -127,7 +127,7 @@ xenXMError(virConnectPtr conn, virErrorN
         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);
 }
 
