mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
conf: Introduce virDomainMemoryFindByDeviceAlias()
This function will be needed in the next commit where we will want to find virtio-mem given its alias by QEMU on the monitor. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
59e9fb98f5
commit
dcd9f8e2c5
@ -16621,6 +16621,23 @@ virDomainMemoryFindByDeviceInfo(virDomainDef *def,
|
||||
}
|
||||
|
||||
|
||||
virDomainMemoryDef *
|
||||
virDomainMemoryFindByDeviceAlias(virDomainDef *def,
|
||||
const char *alias)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < def->nmems; i++) {
|
||||
virDomainMemoryDef *tmp = def->mems[i];
|
||||
|
||||
if (STREQ_NULLABLE(tmp->info.alias, alias))
|
||||
return tmp;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virDomainMemoryInsert:
|
||||
*
|
||||
|
@ -3816,6 +3816,11 @@ virDomainMemoryFindByDeviceInfo(virDomainDef *dev,
|
||||
int *pos)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
virDomainMemoryDef *
|
||||
virDomainMemoryFindByDeviceAlias(virDomainDef *def,
|
||||
const char *alias)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
int virDomainShmemDefInsert(virDomainDef *def, virDomainShmemDef *shmem)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
bool virDomainShmemDefEquals(virDomainShmemDef *src, virDomainShmemDef *dst)
|
||||
|
@ -508,6 +508,7 @@ virDomainMemballoonModelTypeFromString;
|
||||
virDomainMemballoonModelTypeToString;
|
||||
virDomainMemoryDefFree;
|
||||
virDomainMemoryFindByDef;
|
||||
virDomainMemoryFindByDeviceAlias;
|
||||
virDomainMemoryFindByDeviceInfo;
|
||||
virDomainMemoryFindInactiveByDef;
|
||||
virDomainMemoryInsert;
|
||||
|
Loading…
Reference in New Issue
Block a user