[PATCH 07/27] qemu: domain: Move and unexport 'qemuDomainStorageIdReset'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's used only inside qemu_domain.c. Move it before it's usage, along
with the qemuDomainStorageIdNew counterpart and unexport it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 54 +++++++++++++++++++++---------------------
 src/qemu/qemu_domain.h |  1 -
 2 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c764f6296c..64be39d49f 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -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.
+ */
+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)
 {
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 8bf1c91049..7ec337e9ae 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -970,7 +970,6 @@ char * qemuDomainGetManagedPRSocketPath(qemuDomainObjPrivate *priv);
 bool qemuDomainDefHasManagedPR(virDomainObj *vm);

 unsigned int qemuDomainStorageIdNew(qemuDomainObjPrivate *priv);
-void qemuDomainStorageIdReset(qemuDomainObjPrivate *priv);

 virDomainEventResumedDetailType
 qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason);
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux