mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
qemu: domain: Change 'Id' to 'ID' in qemuDomainStorageIdNew/Reset
In a patch adding similarly named APIs I was asked to use 'ID' instead of 'Id'. Since the code is being put together fix qemuDomainStorageIdNew/Reset first. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9693b06630
commit
4d8cb61e4d
@ -657,27 +657,27 @@ qemuDomainMasterKeyCreate(virDomainObj *vm)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qemuDomainStorageIdNew:
|
* qemuDomainStorageIDNew:
|
||||||
* @priv: qemu VM private data object.
|
* @priv: qemu VM private data object.
|
||||||
*
|
*
|
||||||
* Generate a new unique id for a storage object. Useful for node name generation.
|
* Generate a new unique id for a storage object. Useful for node name generation.
|
||||||
*/
|
*/
|
||||||
static unsigned int
|
static unsigned int
|
||||||
qemuDomainStorageIdNew(qemuDomainObjPrivate *priv)
|
qemuDomainStorageIDNew(qemuDomainObjPrivate *priv)
|
||||||
{
|
{
|
||||||
return ++priv->nodenameindex;
|
return ++priv->nodenameindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qemuDomainStorageIdReset:
|
* qemuDomainStorageIDReset:
|
||||||
* @priv: qemu VM private data object.
|
* @priv: qemu VM private data object.
|
||||||
*
|
*
|
||||||
* Resets the data for the node name generator. The node names need to be unique
|
* 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.
|
* for a single instance, so can be reset on VM shutdown.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
qemuDomainStorageIdReset(qemuDomainObjPrivate *priv)
|
qemuDomainStorageIDReset(qemuDomainObjPrivate *priv)
|
||||||
{
|
{
|
||||||
priv->nodenameindex = 0;
|
priv->nodenameindex = 0;
|
||||||
}
|
}
|
||||||
@ -1681,7 +1681,7 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv)
|
|||||||
g_clear_pointer(&priv->backup, virDomainBackupDefFree);
|
g_clear_pointer(&priv->backup, virDomainBackupDefFree);
|
||||||
|
|
||||||
/* reset node name allocator */
|
/* reset node name allocator */
|
||||||
qemuDomainStorageIdReset(priv);
|
qemuDomainStorageIDReset(priv);
|
||||||
|
|
||||||
priv->dbusDaemonRunning = false;
|
priv->dbusDaemonRunning = false;
|
||||||
|
|
||||||
@ -3090,7 +3090,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
|||||||
if (qemuDomainObjPrivateXMLParseBackups(priv, ctxt) < 0)
|
if (qemuDomainObjPrivateXMLParseBackups(priv, ctxt) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
qemuDomainStorageIdReset(priv);
|
qemuDomainStorageIDReset(priv);
|
||||||
if (virXPathULongLong("string(./nodename/@index)", ctxt,
|
if (virXPathULongLong("string(./nodename/@index)", ctxt,
|
||||||
&priv->nodenameindex) == -2) {
|
&priv->nodenameindex) == -2) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
@ -10646,7 +10646,7 @@ qemuDomainPrepareStorageSourceBlockdev(virDomainDiskDef *disk,
|
|||||||
qemuDomainObjPrivate *priv,
|
qemuDomainObjPrivate *priv,
|
||||||
virQEMUDriverConfig *cfg)
|
virQEMUDriverConfig *cfg)
|
||||||
{
|
{
|
||||||
src->id = qemuDomainStorageIdNew(priv);
|
src->id = qemuDomainStorageIDNew(priv);
|
||||||
|
|
||||||
src->nodestorage = g_strdup_printf("libvirt-%u-storage", src->id);
|
src->nodestorage = g_strdup_printf("libvirt-%u-storage", src->id);
|
||||||
src->nodeformat = g_strdup_printf("libvirt-%u-format", src->id);
|
src->nodeformat = g_strdup_printf("libvirt-%u-format", src->id);
|
||||||
@ -10773,7 +10773,7 @@ qemuDomainPrepareHostdev(virDomainHostdevDef *hostdev,
|
|||||||
src->readonly = hostdev->readonly;
|
src->readonly = hostdev->readonly;
|
||||||
|
|
||||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI)) {
|
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI)) {
|
||||||
src->id = qemuDomainStorageIdNew(priv);
|
src->id = qemuDomainStorageIDNew(priv);
|
||||||
src->nodestorage = g_strdup_printf("libvirt-%d-backend", src->id);
|
src->nodestorage = g_strdup_printf("libvirt-%d-backend", src->id);
|
||||||
backendalias = src->nodestorage;
|
backendalias = src->nodestorage;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user