Blame SOURCES/libvirt-qemu-monitor-Avoid-shadowing-variable-devname-on-FreeBSD.-Again.patch

9119d9
From 08d883a0282f1a3355b868ed2037eb339d9f5d55 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <08d883a0282f1a3355b868ed2037eb339d9f5d55@dist-git>
9119d9
From: Peter Krempa <pkrempa@redhat.com>
9119d9
Date: Wed, 1 Oct 2014 15:23:39 +0200
9119d9
Subject: [PATCH] qemu: monitor: Avoid shadowing variable "devname" on FreeBSD.
9119d9
 Again.
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1113116
9119d9
9119d9
FreeBSD's compiler complains that we shadow the symbol. Sigh.
9119d9
9119d9
s/devname/dev_name/
9119d9
9119d9
(cherry picked from commit 72945c062916bbfbb509a4b364cfa4bb9b5b2606)
9119d9
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_monitor_json.c | 10 +++++-----
9119d9
 1 file changed, 5 insertions(+), 5 deletions(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
9119d9
index 2227744..adf560a 100644
9119d9
--- a/src/qemu/qemu_monitor_json.c
9119d9
+++ b/src/qemu/qemu_monitor_json.c
9119d9
@@ -1967,7 +1967,7 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
9119d9
         virJSONValuePtr inserted;
9119d9
         virJSONValuePtr image;
9119d9
         qemuBlockStatsPtr bstats;
9119d9
-        const char *devname;
9119d9
+        const char *dev_name;
9119d9
 
9119d9
         if (!dev || dev->type != VIR_JSON_TYPE_OBJECT) {
9119d9
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
9119d9
@@ -1976,18 +1976,18 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
9119d9
             goto cleanup;
9119d9
         }
9119d9
 
9119d9
-        if (!(devname = virJSONValueObjectGetString(dev, "device"))) {
9119d9
+        if (!(dev_name = virJSONValueObjectGetString(dev, "device"))) {
9119d9
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
9119d9
                            _("query-block device entry was not "
9119d9
                              "in expected format"));
9119d9
             goto cleanup;
9119d9
         }
9119d9
 
9119d9
-        if (STRPREFIX(devname, QEMU_DRIVE_HOST_PREFIX))
9119d9
-            devname += strlen(QEMU_DRIVE_HOST_PREFIX);
9119d9
+        if (STRPREFIX(dev_name, QEMU_DRIVE_HOST_PREFIX))
9119d9
+            dev_name += strlen(QEMU_DRIVE_HOST_PREFIX);
9119d9
 
9119d9
         /* ignore missing info */
9119d9
-        if (!(bstats = virHashLookup(stats, devname)))
9119d9
+        if (!(bstats = virHashLookup(stats, dev_name)))
9119d9
             continue;
9119d9
 
9119d9
         /* drive may be empty */
9119d9
-- 
9119d9
2.1.2
9119d9