qemu: domain: Rename qemuDomainStorageSourceChainAccessPrepare

The function will be able to deal with non-chains too so drop 'Chain'
and also change the suffix to 'Modify' as it's used both for setup and
teardown.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-04-18 10:36:30 +02:00
parent 45b9ec5b09
commit 0ae504d375

View File

@ -9212,7 +9212,7 @@ qemuDomainDiskGetBackendAlias(virDomainDiskDefPtr disk,
/** /**
* qemuDomainStorageSourceChainAccessPrepare: * qemuDomainStorageSourceAccessModify:
* @driver: qemu driver struct * @driver: qemu driver struct
* @vm: domain object * @vm: domain object
* @src: Source to prepare * @src: Source to prepare
@ -9225,10 +9225,10 @@ qemuDomainDiskGetBackendAlias(virDomainDiskDefPtr disk,
* Returns 0 on success and -1 on error. Reports libvirt error. * Returns 0 on success and -1 on error. Reports libvirt error.
*/ */
static int static int
qemuDomainStorageSourceChainAccessPrepare(virQEMUDriverPtr driver, qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
virStorageSourcePtr src, virStorageSourcePtr src,
bool teardown) bool teardown)
{ {
VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(driver); VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(driver);
const char *srcstr = NULLSTR(src->path); const char *srcstr = NULLSTR(src->path);
@ -9284,7 +9284,7 @@ qemuDomainStorageSourceChainAccessAllow(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
virStorageSourcePtr src) virStorageSourcePtr src)
{ {
return qemuDomainStorageSourceChainAccessPrepare(driver, vm, src, false); return qemuDomainStorageSourceAccessModify(driver, vm, src, false);
} }
@ -9293,7 +9293,7 @@ qemuDomainStorageSourceChainAccessRevoke(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
virStorageSourcePtr src) virStorageSourcePtr src)
{ {
return qemuDomainStorageSourceChainAccessPrepare(driver, vm, src, true); return qemuDomainStorageSourceAccessModify(driver, vm, src, true);
} }