[libvirt] [PATCH 04/19] virsh: Rename virshInterfaceNameCompleter to virshInterfaceCompleter

Lin Ma lma at suse.com
Mon Nov 2 08:26:06 UTC 2020


Rename the function virshInterfaceNameCompleter to virshInterfaceCompleter
to make it a bit more generic.
The upcoming patch invokes it for mac completion.

Signed-off-by: Lin Ma <lma at suse.com>
---
 tools/virsh-completer-interface.c | 6 +++---
 tools/virsh-completer-interface.h | 6 +++---
 tools/virsh-interface.c           | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/virsh-completer-interface.c b/tools/virsh-completer-interface.c
index 8028db8746..777bb22b0b 100644
--- a/tools/virsh-completer-interface.c
+++ b/tools/virsh-completer-interface.c
@@ -26,9 +26,9 @@
 #include "virstring.h"
 
 char **
-virshInterfaceNameCompleter(vshControl *ctl,
-                            const vshCmd *cmd G_GNUC_UNUSED,
-                            unsigned int flags)
+virshInterfaceCompleter(vshControl *ctl,
+                        const vshCmd *cmd G_GNUC_UNUSED,
+                        unsigned int flags)
 {
     virshControlPtr priv = ctl->privData;
     virInterfacePtr *ifaces = NULL;
diff --git a/tools/virsh-completer-interface.h b/tools/virsh-completer-interface.h
index 893dee5a6b..2b382222d7 100644
--- a/tools/virsh-completer-interface.h
+++ b/tools/virsh-completer-interface.h
@@ -22,6 +22,6 @@
 
 #include "vsh.h"
 
-char ** virshInterfaceNameCompleter(vshControl *ctl,
-                                    const vshCmd *cmd,
-                                    unsigned int flags);
+char ** virshInterfaceCompleter(vshControl *ctl,
+                                const vshCmd *cmd,
+                                unsigned int flags);
diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index 8cdbc6e85f..bd57648779 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -23,7 +23,7 @@
      .type = VSH_OT_DATA, \
      .flags = VSH_OFLAG_REQ, \
      .help = N_("interface name or MAC address"), \
-     .completer = virshInterfaceNameCompleter, \
+     .completer = virshInterfaceCompleter, \
      .completer_flags = cflags, \
     }
 
-- 
2.26.0





More information about the libvir-list mailing list