mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
vmx: Accept empty fileName for cdrom-image
Turns out, there are two ways to specify an empty CD-ROM drive in a .vmx file: 1) .fileName = "emptyBackingString" 2) .fileName = "" While we do parse 1) successfully, the code does not accept 2) and an error is reported. Modify the code to treat both cases the same. Resolves: https://issues.redhat.com/browse/RHEL-19380 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6828c6eb67
commit
555b9c5827
@ -2484,7 +2484,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOption *xmlopt, virConf *conf,
|
||||
*/
|
||||
goto ignore;
|
||||
}
|
||||
} else if (fileName && STREQ(fileName, "emptyBackingString")) {
|
||||
} else if (fileName && (STREQ(fileName, "") ||
|
||||
STREQ(fileName, "emptyBackingString"))) {
|
||||
if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting VMX entry '%1$s' to be 'cdrom-image' but found '%2$s'"),
|
||||
|
Loading…
Reference in New Issue
Block a user