mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00: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
|
* @def: domain definition to look for the disk
|
||||||
* @nodename: block backend node name to find
|
* @nodename: block backend node name to find
|
||||||
* @src: filled with the specific backing store element if provided
|
* @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.
|
* 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
|
* Optionally fills @src and @idx if provided with the specific backing chain
|
||||||
@ -11594,24 +11593,17 @@ qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
|
|||||||
virDomainDiskDefPtr
|
virDomainDiskDefPtr
|
||||||
qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
||||||
const char *nodename,
|
const char *nodename,
|
||||||
virStorageSourcePtr *src,
|
virStorageSourcePtr *src)
|
||||||
unsigned int *idx)
|
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
unsigned int srcindex;
|
|
||||||
virStorageSourcePtr tmp = NULL;
|
virStorageSourcePtr tmp = NULL;
|
||||||
|
|
||||||
if (!idx)
|
|
||||||
idx = &srcindex;
|
|
||||||
|
|
||||||
if (src)
|
if (src)
|
||||||
*src = NULL;
|
*src = NULL;
|
||||||
|
|
||||||
*idx = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if ((tmp = virStorageSourceFindByNodeName(def->disks[i]->src,
|
if ((tmp = virStorageSourceFindByNodeName(def->disks[i]->src,
|
||||||
nodename, idx))) {
|
nodename, NULL))) {
|
||||||
if (src)
|
if (src)
|
||||||
*src = tmp;
|
*src = tmp;
|
||||||
|
|
||||||
|
@ -969,8 +969,7 @@ int qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
|
|||||||
|
|
||||||
virDomainDiskDefPtr qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
virDomainDiskDefPtr qemuDomainDiskLookupByNodename(virDomainDefPtr def,
|
||||||
const char *nodename,
|
const char *nodename,
|
||||||
virStorageSourcePtr *src,
|
virStorageSourcePtr *src);
|
||||||
unsigned int *idx);
|
|
||||||
|
|
||||||
char *qemuDomainDiskBackingStoreGetName(virDomainDiskDefPtr disk,
|
char *qemuDomainDiskBackingStoreGetName(virDomainDiskDefPtr disk,
|
||||||
unsigned int idx);
|
unsigned int idx);
|
||||||
|
@ -880,7 +880,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon G_GNUC_UNUSED,
|
|||||||
if (diskAlias)
|
if (diskAlias)
|
||||||
disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL);
|
disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL);
|
||||||
else if (nodename)
|
else if (nodename)
|
||||||
disk = qemuDomainDiskLookupByNodename(vm->def, nodename, NULL, NULL);
|
disk = qemuDomainDiskLookupByNodename(vm->def, nodename, NULL);
|
||||||
else
|
else
|
||||||
disk = NULL;
|
disk = NULL;
|
||||||
|
|
||||||
@ -1509,7 +1509,7 @@ qemuProcessHandleBlockThreshold(qemuMonitorPtr mon G_GNUC_UNUSED,
|
|||||||
"threshold '%llu' exceeded by '%llu'",
|
"threshold '%llu' exceeded by '%llu'",
|
||||||
nodename, vm, vm->def->name, threshold, excess);
|
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))
|
if (virStorageSourceIsLocalStorage(src))
|
||||||
path = src->path;
|
path = src->path;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user