]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: domain: Move and unexport 'qemuDomainStorageIdNew/Reset'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 24 Jan 2022 16:09:41 +0000 (17:09 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 14 Feb 2022 12:13:59 +0000 (13:13 +0100)
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>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h

index c764f6296cdcd88b5deab64da0a7cfcec87605e0..d44244f9b82cd078749c609ee0d894df38c36e99 100644 (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)
 {
index 8bf1c91049f72e63aa107a531f92331be7c74035..0a9d312b65d78d53d44aad6440feb386560355c8 100644 (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);