提交 10732a50 编写于 作者: D Daniel P. Berrange

Added additional check for failure of core dump on domain-0

上级 00602abe
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
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册