|
|
898951 |
From 63f44f163b462a7dffefa927df771fcc88ab603f Mon Sep 17 00:00:00 2001
|
|
|
898951 |
Message-Id: <63f44f163b462a7dffefa927df771fcc88ab603f@dist-git>
|
|
|
898951 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
898951 |
Date: Thu, 22 Jan 2015 15:53:53 +0100
|
|
|
898951 |
Subject: [PATCH] virsh: Don't shadow global variable "remove" in cmdMetadata
|
|
|
898951 |
|
|
|
898951 |
https://bugzilla.redhat.com/show_bug.cgi?id=1184929
|
|
|
898951 |
|
|
|
898951 |
Some systems apparently have a global variable/function called remove
|
|
|
898951 |
and thus break compilation of virsh-domain.c. Rename the variable to
|
|
|
898951 |
avoid this.
|
|
|
898951 |
|
|
|
898951 |
Reported by GuanQiang.
|
|
|
898951 |
|
|
|
898951 |
(cherry picked from commit 6bf4c779841f858872003ffe6a97df395b2940e6)
|
|
|
898951 |
|
|
|
898951 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
898951 |
---
|
|
|
898951 |
tools/virsh-domain.c | 6 +++---
|
|
|
898951 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
898951 |
|
|
|
898951 |
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
|
|
|
898951 |
index a2796e5..dd697f9 100644
|
|
|
898951 |
--- a/tools/virsh-domain.c
|
|
|
898951 |
+++ b/tools/virsh-domain.c
|
|
|
898951 |
@@ -6894,7 +6894,7 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
|
|
|
898951 |
bool live = vshCommandOptBool(cmd, "live");
|
|
|
898951 |
bool current = vshCommandOptBool(cmd, "current");
|
|
|
898951 |
bool edit = vshCommandOptBool(cmd, "edit");
|
|
|
898951 |
- bool remove = vshCommandOptBool(cmd, "remove");
|
|
|
898951 |
+ bool rem = vshCommandOptBool(cmd, "remove");
|
|
|
898951 |
const char *set = NULL;
|
|
|
898951 |
const char *uri = NULL;
|
|
|
898951 |
const char *key = NULL;
|
|
|
898951 |
@@ -6926,12 +6926,12 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
|
|
|
898951 |
goto cleanup;
|
|
|
898951 |
}
|
|
|
898951 |
|
|
|
898951 |
- if (set || remove) {
|
|
|
898951 |
+ if (set || rem) {
|
|
|
898951 |
if (virDomainSetMetadata(dom, VIR_DOMAIN_METADATA_ELEMENT,
|
|
|
898951 |
set, key, uri, flags))
|
|
|
898951 |
goto cleanup;
|
|
|
898951 |
|
|
|
898951 |
- if (remove)
|
|
|
898951 |
+ if (rem)
|
|
|
898951 |
vshPrint("%s\n", _("Metadata removed"));
|
|
|
898951 |
else
|
|
|
898951 |
vshPrint("%s\n", _("Metadata modified"));
|
|
|
898951 |
--
|
|
|
898951 |
2.2.1
|
|
|
898951 |
|