提交 23263af6 编写于 作者: D Doug Goldstein

VMX: Improve disk parse error for unknown values

Previously the error message showed the following:

error: internal error: Invalid or not yet handled value 'auto detect'
for VMX entry 'ide0:0.fileName'

This left the user unsure if it was a CD-ROM or a disk device that they
needed to fix. Now the error shows:

error: internal error: Invalid or not yet handled value 'auto detect'
for VMX entry 'ide0:0.fileName' for device type 'cdrom-raw'

Which should hopefully make it easier to see the issue with the VMX
configuration.
上级 f083ff82
...@@ -2184,8 +2184,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con ...@@ -2184,8 +2184,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
goto ignore; goto ignore;
} else { } else {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid or not yet handled value '%s' for VMX entry " _("Invalid or not yet handled value '%s' "
"'%s'"), fileName, fileName_name); "for VMX entry '%s' for device type '%s'"),
fileName, fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup; goto cleanup;
} }
} else if (device == VIR_DOMAIN_DISK_DEVICE_CDROM) { } else if (device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
...@@ -2220,8 +2222,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con ...@@ -2220,8 +2222,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
fileName = NULL; fileName = NULL;
} else { } else {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid or not yet handled value '%s' for VMX entry " _("Invalid or not yet handled value '%s' "
"'%s'"), fileName, fileName_name); "for VMX entry '%s' for device type '%s'"),
fileName, fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup; goto cleanup;
} }
} else if (device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) { } else if (device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) {
...@@ -2248,8 +2252,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con ...@@ -2248,8 +2252,10 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
fileName = NULL; fileName = NULL;
} else { } else {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid or not yet handled value '%s' for VMX entry " _("Invalid or not yet handled value '%s' "
"'%s'"), fileName, fileName_name); "for VMX entry '%s' for device type '%s'"),
fileName, fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup; goto cleanup;
} }
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册