]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Added additional check for failure of core dump on domain-0
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Feb 2007 15:50:03 +0000 (15:50 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Feb 2007 15:50:03 +0000 (15:50 +0000)
ChangeLog
src/xend_internal.c

index c6a9bf0bcfbc404a7740ab785edb91bf0e408a1f..4af0013bbbc746a6c2781c414871deaeb4c5b55b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 27 10:49:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/xend_internal.c: Check POST reply for 'Cannot' to detect
+       failure of core dump on Domain-0. Signed-off-by: Kazuki Mizushima
+
 Tue Feb 27 10:35:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
 
        * src/virsh.c: Fix SEGV when doing tab-completion of commands
index bb42bc67dae9e7501bb301449f1d697e5df04e14..f7288d61f3ae11ea6e67c4c2fc85500b88a78c4f 100644 (file)
@@ -508,7 +508,14 @@ xend_post(virConnectPtr xend, const char *path, const char *ops,
 
     if ((ret < 0) || (ret >= 300)) {
         virXendError(xend, VIR_ERR_POST_FAILED, content);
-    } else if ((ret = 202) && (strstr(content, "failed") != NULL)) {
+    } else if ((ret == 202) && (strstr(content, "failed") != NULL)) {
+        virXendError(xend, VIR_ERR_POST_FAILED, content);
+        ret = -1;
+    } else if ((ret == 202) && (strstr(content, "Cannot") != NULL)) {
+        /* This is to catch case of 'virsh dump Domain-0 foo'
+         * which returns a success code, but the word 'Cannot'
+         * in body to indicate error
+         */
         virXendError(xend, VIR_ERR_POST_FAILED, content);
         ret = -1;
     }