mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-23 06:23:10 +00:00
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
This commit is contained in:
parent
9bf1cef737
commit
4ceaa7491e
@ -5280,7 +5280,7 @@ doDump(void *opaque)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vshCommandOptString(ctl, cmd, "format", &format)) {
|
if (vshCommandOptString(ctl, cmd, "format", &format) > 0) {
|
||||||
if (STREQ(format, "kdump-zlib")) {
|
if (STREQ(format, "kdump-zlib")) {
|
||||||
dumpformat = VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB;
|
dumpformat = VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB;
|
||||||
} else if (STREQ(format, "kdump-lzo")) {
|
} else if (STREQ(format, "kdump-lzo")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user