qemu: domain: Move and unexport 'qemuDomainStorageIdNew/Reset'

They're used only inside qemu_domain.c. Move it before their usage,
and unexport them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-01-24 17:09:41 +01:00
parent 6901d92ec4
commit 9693b06630
2 changed files with 27 additions and 30 deletions

View File

@ -656,6 +656,33 @@ qemuDomainMasterKeyCreate(virDomainObj *vm)
}
/**
* qemuDomainStorageIdNew:
* @priv: qemu VM private data object.
*
* Generate a new unique id for a storage object. Useful for node name generation.
*/
static unsigned int
qemuDomainStorageIdNew(qemuDomainObjPrivate *priv)
{
return ++priv->nodenameindex;
}
/**
* qemuDomainStorageIdReset:
* @priv: qemu VM private data object.
*
* Resets the data for the node name generator. The node names need to be unique
* for a single instance, so can be reset on VM shutdown.
*/
static void
qemuDomainStorageIdReset(qemuDomainObjPrivate *priv)
{
priv->nodenameindex = 0;
}
static void
qemuDomainSecretInfoClear(qemuDomainSecretInfo *secinfo,
bool keepAlias)
@ -10889,33 +10916,6 @@ qemuDomainGetManagedPRSocketPath(qemuDomainObjPrivate *priv)
}
/**
* qemuDomainStorageIdNew:
* @priv: qemu VM private data object.
*
* Generate a new unique id for a storage object. Useful for node name generation.
*/
unsigned int
qemuDomainStorageIdNew(qemuDomainObjPrivate *priv)
{
return ++priv->nodenameindex;
}
/**
* qemuDomainStorageIdReset:
* @priv: qemu VM private data object.
*
* Resets the data for the node name generator. The node names need to be unique
* for a single instance, so can be reset on VM shutdown.
*/
void
qemuDomainStorageIdReset(qemuDomainObjPrivate *priv)
{
priv->nodenameindex = 0;
}
virDomainEventResumedDetailType
qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason)
{

View File

@ -969,9 +969,6 @@ char * qemuDomainGetManagedPRSocketPath(qemuDomainObjPrivate *priv);
bool qemuDomainDefHasManagedPR(virDomainObj *vm);
unsigned int qemuDomainStorageIdNew(qemuDomainObjPrivate *priv);
void qemuDomainStorageIdReset(qemuDomainObjPrivate *priv);
virDomainEventResumedDetailType
qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason);