mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
conf: disk: Rename virDomainDiskDefValidate to virDomainDiskDefParseValidate
Name the validation function distinctively since it's called in the parser. Later patches will add function that will validate disk definitions that are invalid but need to be parsed to avoid losing domains.
This commit is contained in:
parent
4a718d6a0e
commit
827ce46e59
@ -6939,7 +6939,7 @@ virDomainDiskDefGeometryParse(virDomainDiskDefPtr def,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainDiskDefValidate(const virDomainDiskDef *def)
|
virDomainDiskDefParseValidate(const virDomainDiskDef *def)
|
||||||
{
|
{
|
||||||
if (def->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) {
|
if (def->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) {
|
||||||
if (def->event_idx != VIR_TRISTATE_SWITCH_ABSENT) {
|
if (def->event_idx != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||||
@ -7544,7 +7544,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainDiskDefValidate(def) < 0)
|
if (virDomainDiskDefParseValidate(def) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user