mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
virsh: Don't shadow global variable "remove" in cmdMetadata
Some systems apparently have a global variable/function called remove and thus break compilation of virsh-domain.c. Rename the variable to avoid this. Reported by GuanQiang.
This commit is contained in:
1 parent
0d4f469c87
commit
6bf4c77984
1 file changed
+3
-3
@@ -6854,7 +6854,7 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
|
||||
bool live = vshCommandOptBool(cmd, "live");
|
||||
bool current = vshCommandOptBool(cmd, "current");
|
||||
bool edit = vshCommandOptBool(cmd, "edit");
|
||||
bool remove = vshCommandOptBool(cmd, "remove");
|
||||
bool rem = vshCommandOptBool(cmd, "remove");
|
||||
const char *set = NULL;
|
||||
const char *uri = NULL;
|
||||
const char *key = NULL;
|
||||
@@ -6886,12 +6886,12 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (set || remove) {
|
||||
if (set || rem) {
|
||||
if (virDomainSetMetadata(dom, VIR_DOMAIN_METADATA_ELEMENT,
|
||||
set, key, uri, flags))
|
||||
goto cleanup;
|
||||
|
||||
if (remove)
|
||||
if (rem)
|
||||
vshPrint("%s\n", _("Metadata removed"));
|
||||
else
|
||||
vshPrint("%s\n", _("Metadata modified"));
|
||||
|
||||
Reference in new issue
Block a user