[PATCH 1/5] virsh-host: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers

Peter Krempa pkrempa at redhat.com
Mon Jul 19 11:47:51 UTC 2021


Stuff used in virsh should use 'virsh'.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tools/virsh-completer-host.c | 2 +-
 tools/virsh-domain.c         | 2 +-
 tools/virsh-host.c           | 4 ++--
 tools/virsh-host.h           | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c
index d17bc5f5ce..3795d1fd3a 100644
--- a/tools/virsh-completer-host.c
+++ b/tools/virsh-completer-host.c
@@ -183,7 +183,7 @@ virshNodeSuspendTargetCompleter(vshControl *ctl G_GNUC_UNUSED,
     ret = g_new0(char *, VIR_NODE_SUSPEND_TARGET_LAST + 1);

     for (i = 0; i < VIR_NODE_SUSPEND_TARGET_LAST; i++)
-        ret[i] = g_strdup(virNodeSuspendTargetTypeToString(i));
+        ret[i] = g_strdup(virshNodeSuspendTargetTypeToString(i));

     return ret;
 }
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 29748b0257..f59be4e29d 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3488,7 +3488,7 @@ cmdDomPMSuspend(vshControl *ctl, const vshCmd *cmd)
     if (vshCommandOptStringReq(ctl, cmd, "target", &target) < 0)
         goto cleanup;

-    if ((suspendTarget = virNodeSuspendTargetTypeFromString(target)) < 0) {
+    if ((suspendTarget = virshNodeSuspendTargetTypeFromString(target)) < 0) {
         vshError(ctl, "%s", _("Invalid target"));
         goto cleanup;
     }
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index f42e995122..7b47b7583d 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -951,7 +951,7 @@ cmdNodeMemStats(vshControl *ctl, const vshCmd *cmd)
  * "nodesuspend" command
  */

-VIR_ENUM_IMPL(virNodeSuspendTarget,
+VIR_ENUM_IMPL(virshNodeSuspendTarget,
               VIR_NODE_SUSPEND_TARGET_LAST,
               "mem",
               "disk",
@@ -998,7 +998,7 @@ cmdNodeSuspend(vshControl *ctl, const vshCmd *cmd)
     if (vshCommandOptLongLong(ctl, cmd, "duration", &duration) < 0)
         return false;

-    if ((suspendTarget = virNodeSuspendTargetTypeFromString(target)) < 0) {
+    if ((suspendTarget = virshNodeSuspendTargetTypeFromString(target)) < 0) {
         vshError(ctl, "%s", _("Invalid target"));
         return false;
     }
diff --git a/tools/virsh-host.h b/tools/virsh-host.h
index 840f0b4538..f12258018d 100644
--- a/tools/virsh-host.h
+++ b/tools/virsh-host.h
@@ -25,4 +25,4 @@

 extern const vshCmdDef hostAndHypervisorCmds[];

-VIR_ENUM_DECL(virNodeSuspendTarget);
+VIR_ENUM_DECL(virshNodeSuspendTarget);
-- 
2.31.1




More information about the libvir-list mailing list