1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

qemu: domain: Document and export qemuDomainCheckDiskStartupPolicy

This commit is contained in:
Peter Krempa 2017-10-03 12:51:47 +02:00
parent 2e78c588d8
commit 76039bba87
2 changed files with 22 additions and 1 deletions

View File

@ -5625,7 +5625,23 @@ qemuDomainCheckRemoveOptionalDisk(virQEMUDriverPtr driver,
qemuDomainEventQueue(driver, event);
}
static int
/**
* qemuDomainCheckDiskStartupPolicy:
* @driver: qemu driver object
* @vm: domain object
* @disk: index of disk to check
* @cold_boot: true if a new VM is being started
*
* This function should be called when the source storage for a disk device is
* missing. The function checks whether the startup policy for the disk allows
* removal of the source (or disk) according to the state of the VM.
*
* The function returns 0 if the source or disk was dropped and -1 if the state
* of the VM does not allow this. This function does not report errors, but
* clears any reported error if 0 is returned.
*/
int
qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
virDomainObjPtr vm,
size_t diskIndex,

View File

@ -639,6 +639,11 @@ void qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
bool qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv,
qemuDomainJob job);
int qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
virDomainObjPtr vm,
size_t diskIndex,
bool cold_boot);
int qemuDomainCheckDiskPresence(virConnectPtr conn,
virQEMUDriverPtr driver,
virDomainObjPtr vm,