提交 4ceaa749 编写于 作者: P Peter Krempa

virsh: Use 'format' argument only when specified

The condition checking whether --format was specified was incorrect.
virsh crashed if the following format was used:

 virsh dump VM dump --format '' --memory-only

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1272301
上级 9bf1cef7
......@@ -5280,7 +5280,7 @@ doDump(void *opaque)
goto out;
}
if (vshCommandOptString(ctl, cmd, "format", &format)) {
if (vshCommandOptString(ctl, cmd, "format", &format) > 0) {
if (STREQ(format, "kdump-zlib")) {
dumpformat = VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB;
} else if (STREQ(format, "kdump-lzo")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册