mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
esx: Handle missing images in esxParseVMXFileName
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
6c001a37e4
commit
2e6c131487
@ -129,7 +129,7 @@ static int
|
|||||||
esxParseVMXFileName(const char *fileName,
|
esxParseVMXFileName(const char *fileName,
|
||||||
void *opaque,
|
void *opaque,
|
||||||
char **out,
|
char **out,
|
||||||
bool allow_missing G_GNUC_UNUSED)
|
bool allow_missing)
|
||||||
{
|
{
|
||||||
esxVMX_Data *data = opaque;
|
esxVMX_Data *data = opaque;
|
||||||
esxVI_String *propertyNameList = NULL;
|
esxVI_String *propertyNameList = NULL;
|
||||||
@ -223,9 +223,13 @@ esxParseVMXFileName(const char *fileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!datastoreList) {
|
if (!datastoreList) {
|
||||||
|
if (allow_missing) {
|
||||||
|
ret = 0;
|
||||||
|
} else {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("File name '%s' refers to non-existing datastore '%s'"),
|
_("File name '%s' refers to non-existing datastore '%s'"),
|
||||||
fileName, datastoreName);
|
fileName, datastoreName);
|
||||||
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user