[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] build: avoid shadowing devname() on BSD systems



* tools/virsh.c (cmdRunConsole, cmdConsole): Rename problematic
symbol.
Reported by Justin Clift.
---
> IIRC, it had the same warning on FreeBSD, I just didn't post a patch for it yet.
Pushing under the build-breaker rule, then.

 tools/virsh.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 3e1bde1..441fd77 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -732,7 +732,7 @@ static const vshCmdOptDef opts_console[] = {
 };

 static int
-cmdRunConsole(vshControl *ctl, virDomainPtr dom, const char *devname)
+cmdRunConsole(vshControl *ctl, virDomainPtr dom, const char *name)
 {
     int ret = FALSE;
     virDomainInfo dominfo;
@@ -749,7 +749,7 @@ cmdRunConsole(vshControl *ctl, virDomainPtr dom, const char *devname)

     vshPrintExtra(ctl, _("Connected to domain %s\n"), virDomainGetName(dom));
     vshPrintExtra(ctl, "%s", _("Escape character is ^]\n"));
-    if (vshRunConsole(dom, devname) == 0)
+    if (vshRunConsole(dom, name) == 0)
         ret = TRUE;

  cleanup:
@@ -762,7 +762,7 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainPtr dom;
     int ret;
-    const char *devname;
+    const char *name;

     if (!vshConnectionUsability(ctl, ctl->conn))
         return FALSE;
@@ -770,9 +770,9 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
     if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
         return FALSE;

-    devname = vshCommandOptString(cmd, "devname", NULL);
+    name = vshCommandOptString(cmd, "devname", NULL);

-    ret = cmdRunConsole(ctl, dom, devname);
+    ret = cmdRunConsole(ctl, dom, name);

     virDomainFree(dom);
     return ret;
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]