mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
qemu: monitor: Avoid shadowing variable "devname" on FreeBSD. Again.
FreeBSD's compiler complains that we shadow the symbol. Sigh. s/devname/dev_name/
This commit is contained in:
parent
58699b77ee
commit
72945c0629
@ -1993,7 +1993,7 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
|
|||||||
virJSONValuePtr inserted;
|
virJSONValuePtr inserted;
|
||||||
virJSONValuePtr image;
|
virJSONValuePtr image;
|
||||||
qemuBlockStatsPtr bstats;
|
qemuBlockStatsPtr bstats;
|
||||||
const char *devname;
|
const char *dev_name;
|
||||||
|
|
||||||
if (!dev || dev->type != VIR_JSON_TYPE_OBJECT) {
|
if (!dev || dev->type != VIR_JSON_TYPE_OBJECT) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
@ -2002,18 +2002,18 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(devname = virJSONValueObjectGetString(dev, "device"))) {
|
if (!(dev_name = virJSONValueObjectGetString(dev, "device"))) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("query-block device entry was not "
|
_("query-block device entry was not "
|
||||||
"in expected format"));
|
"in expected format"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (STRPREFIX(devname, QEMU_DRIVE_HOST_PREFIX))
|
if (STRPREFIX(dev_name, QEMU_DRIVE_HOST_PREFIX))
|
||||||
devname += strlen(QEMU_DRIVE_HOST_PREFIX);
|
dev_name += strlen(QEMU_DRIVE_HOST_PREFIX);
|
||||||
|
|
||||||
/* ignore missing info */
|
/* ignore missing info */
|
||||||
if (!(bstats = virHashLookup(stats, devname)))
|
if (!(bstats = virHashLookup(stats, dev_name)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* drive may be empty */
|
/* drive may be empty */
|
||||||
|
Loading…
Reference in New Issue
Block a user