mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Introduce qemuDomainSecretSetup
Currently just a shim to call qemuDomainSecretPlainSetup, but soon to be more
This commit is contained in:
parent
238032505f
commit
97868a2b85
@ -835,6 +835,26 @@ qemuDomainSecretPlainSetup(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* qemuDomainSecretSetup:
|
||||||
|
* @conn: Pointer to connection
|
||||||
|
* @secinfo: Pointer to secret info
|
||||||
|
* @protocol: Protocol for secret
|
||||||
|
* @authdef: Pointer to auth data
|
||||||
|
*
|
||||||
|
* A shim to call plain setup.
|
||||||
|
*
|
||||||
|
* Returns 0 on success, -1 on failure
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
qemuDomainSecretSetup(virConnectPtr conn,
|
||||||
|
qemuDomainSecretInfoPtr secinfo,
|
||||||
|
virStorageNetProtocol protocol,
|
||||||
|
virStorageAuthDefPtr authdef)
|
||||||
|
{
|
||||||
|
return qemuDomainSecretPlainSetup(conn, secinfo, protocol, authdef);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* qemuDomainSecretDiskDestroy:
|
/* qemuDomainSecretDiskDestroy:
|
||||||
* @disk: Pointer to a disk definition
|
* @disk: Pointer to a disk definition
|
||||||
*
|
*
|
||||||
@ -880,8 +900,8 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn,
|
|||||||
if (VIR_ALLOC(secinfo) < 0)
|
if (VIR_ALLOC(secinfo) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuDomainSecretPlainSetup(conn, secinfo, src->protocol,
|
if (qemuDomainSecretSetup(conn, secinfo, src->protocol,
|
||||||
src->auth) < 0)
|
src->auth) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
diskPriv->secinfo = secinfo;
|
diskPriv->secinfo = secinfo;
|
||||||
@ -945,9 +965,9 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn,
|
|||||||
if (VIR_ALLOC(secinfo) < 0)
|
if (VIR_ALLOC(secinfo) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuDomainSecretPlainSetup(conn, secinfo,
|
if (qemuDomainSecretSetup(conn, secinfo,
|
||||||
VIR_STORAGE_NET_PROTOCOL_ISCSI,
|
VIR_STORAGE_NET_PROTOCOL_ISCSI,
|
||||||
iscsisrc->auth) < 0)
|
iscsisrc->auth) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
hostdevPriv->secinfo = secinfo;
|
hostdevPriv->secinfo = secinfo;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user