mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 13:17:51 +03:00
qemuDomainDiskLookupByNodename: Remove unused 'idx'
All callers pass NULL as the value. Remove the argument. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
877d705ccf
commit
db712b0673
@ -11585,7 +11585,6 @@ qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
|
||||
* @def: domain definition to look for the disk
|
||||
* @nodename: block backend node name to find
|
||||
* @src: filled with the specific backing store element if provided
|
||||
* @idx: index of @src in the backing chain, if provided
|
||||
*
|
||||
* Looks up the disk in the domain via @nodename and returns its definition.
|
||||
* Optionally fills @src and @idx if provided with the specific backing chain
|
||||
@ -11594,24 +11593,17 @@ qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr
|
||||
qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
||||
const char *nodename,
|
||||
virStorageSourcePtr *src,
|
||||
unsigned int *idx)
|
||||
virStorageSourcePtr *src)
|
||||
{
|
||||
size_t i;
|
||||
unsigned int srcindex;
|
||||
virStorageSourcePtr tmp = NULL;
|
||||
|
||||
if (!idx)
|
||||
idx = &srcindex;
|
||||
|
||||
if (src)
|
||||
*src = NULL;
|
||||
|
||||
*idx = 0;
|
||||
|
||||
for (i = 0; i < def->ndisks; i++) {
|
||||
if ((tmp = virStorageSourceFindByNodeName(def->disks[i]->src,
|
||||
nodename, idx))) {
|
||||
nodename, NULL))) {
|
||||
if (src)
|
||||
*src = tmp;
|
||||
|
||||
|
@ -969,8 +969,7 @@ int qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
|
||||
|
||||
virDomainDiskDefPtr qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
||||
const char *nodename,
|
||||
virStorageSourcePtr *src,
|
||||
unsigned int *idx);
|
||||
virStorageSourcePtr *src);
|
||||
|
||||
char *qemuDomainDiskBackingStoreGetName(virDomainDiskDefPtr disk,
|
||||
unsigned int idx);
|
||||
|
@ -880,7 +880,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon G_GNUC_UNUSED,
|
||||
if (diskAlias)
|
||||
disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL);
|
||||
else if (nodename)
|
||||
disk = qemuDomainDiskLookupByNodename(vm->def, nodename, NULL, NULL);
|
||||
disk = qemuDomainDiskLookupByNodename(vm->def, nodename, NULL);
|
||||
else
|
||||
disk = NULL;
|
||||
|
||||
@ -1509,7 +1509,7 @@ qemuProcessHandleBlockThreshold(qemuMonitorPtr mon G_GNUC_UNUSED,
|
||||
"threshold '%llu' exceeded by '%llu'",
|
||||
nodename, vm, vm->def->name, threshold, excess);
|
||||
|
||||
if ((disk = qemuDomainDiskLookupByNodename(vm->def, nodename, &src, NULL))) {
|
||||
if ((disk = qemuDomainDiskLookupByNodename(vm->def, nodename, &src))) {
|
||||
if (virStorageSourceIsLocalStorage(src))
|
||||
path = src->path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user