[PATCH 01/14] tools: s/Nodedev/NodeDevice/

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

 



The proper name is [vir|virsh]NodeDevice* and not Nodedev.
Fortunately, there are only handful of offenders.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tools/virsh-completer.c | 14 +++++++-------
 tools/virsh-completer.h | 12 ++++++------
 tools/virsh-nodedev.c   | 16 ++++++++--------
 tools/virsh-nodedev.h   |  6 +++---
 4 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index 37f946d4b6..63e2fe17e6 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -953,9 +953,9 @@ virshDomainInterfaceStateCompleter(vshControl *ctl,
 
 
 char **
-virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
-                               const vshCmd *cmd ATTRIBUTE_UNUSED,
-                               unsigned int flags)
+virshNodeDeviceEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
+                                  const vshCmd *cmd ATTRIBUTE_UNUSED,
+                                  unsigned int flags)
 {
     size_t i = 0;
     char **ret = NULL;
@@ -967,7 +967,7 @@ virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
         return NULL;
 
     for (i = 0; i < VIR_NODE_DEVICE_EVENT_ID_LAST; i++) {
-        if (VIR_STRDUP(tmp[i], virshNodedevEventCallbacks[i].name) < 0)
+        if (VIR_STRDUP(tmp[i], virshNodeDeviceEventCallbacks[i].name) < 0)
             return NULL;
     }
 
@@ -977,9 +977,9 @@ virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
 
 
 char **
-virshNodedevCapabilityNameCompleter(vshControl *ctl,
-                                    const vshCmd *cmd,
-                                    unsigned int flags)
+virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
+                                       const vshCmd *cmd,
+                                       unsigned int flags)
 {
     VIR_AUTOSTRINGLIST tmp = NULL;
     const char *cap_str = NULL;
diff --git a/tools/virsh-completer.h b/tools/virsh-completer.h
index cb7aafcc8c..1b4694d44d 100644
--- a/tools/virsh-completer.h
+++ b/tools/virsh-completer.h
@@ -102,13 +102,13 @@ char ** virshDomainInterfaceStateCompleter(vshControl *ctl,
                                            const vshCmd *cmd,
                                            unsigned int flags);
 
-char ** virshNodedevEventNameCompleter(vshControl *ctl,
-                                       const vshCmd *cmd,
-                                       unsigned int flags);
+char ** virshNodeDeviceEventNameCompleter(vshControl *ctl,
+                                          const vshCmd *cmd,
+                                          unsigned int flags);
 
-char ** virshNodedevCapabilityNameCompleter(vshControl *ctl,
-                                            const vshCmd *cmd,
-                                            unsigned int flags);
+char ** virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
+                                               const vshCmd *cmd,
+                                               unsigned int flags);
 
 char ** virshDomainDeviceAliasCompleter(vshControl *ctl,
                                         const vshCmd *cmd,
diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index e8372a4daf..b21e2e2fcc 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -375,7 +375,7 @@ static const vshCmdOptDef opts_node_list_devices[] = {
     },
     {.name = "cap",
      .type = VSH_OT_STRING,
-     .completer = virshNodedevCapabilityNameCompleter,
+     .completer = virshNodeDeviceCapabilityNameCompleter,
      .help = N_("capability names, separated by comma")
     },
     {.name = NULL}
@@ -775,7 +775,7 @@ struct virshNodeDeviceEventData {
     bool loop;
     bool timestamp;
     int count;
-    virshNodedevEventCallback *cb;
+    virshNodeDeviceEventCallback *cb;
 };
 typedef struct virshNodeDeviceEventData virshNodeDeviceEventData;
 
@@ -841,12 +841,12 @@ vshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
         vshEventDone(data->ctl);
 }
 
-virshNodedevEventCallback virshNodedevEventCallbacks[] = {
+virshNodeDeviceEventCallback virshNodeDeviceEventCallbacks[] = {
     { "lifecycle",
       VIR_NODE_DEVICE_EVENT_CALLBACK(vshEventLifecyclePrint), },
     { "update", vshEventGenericPrint, }
 };
-verify(VIR_NODE_DEVICE_EVENT_ID_LAST == ARRAY_CARDINALITY(virshNodedevEventCallbacks));
+verify(VIR_NODE_DEVICE_EVENT_ID_LAST == ARRAY_CARDINALITY(virshNodeDeviceEventCallbacks));
 
 
 static const vshCmdInfo info_node_device_event[] = {
@@ -867,7 +867,7 @@ static const vshCmdOptDef opts_node_device_event[] = {
     },
     {.name = "event",
      .type = VSH_OT_STRING,
-     .completer = virshNodedevEventNameCompleter,
+     .completer = virshNodeDeviceEventNameCompleter,
      .help = N_("which event type to wait for")
     },
     {.name = "loop",
@@ -906,7 +906,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
         size_t i;
 
         for (i = 0; i < VIR_NODE_DEVICE_EVENT_ID_LAST; i++)
-            vshPrint(ctl, "%s\n", virshNodedevEventCallbacks[i].name);
+            vshPrint(ctl, "%s\n", virshNodeDeviceEventCallbacks[i].name);
         return true;
     }
 
@@ -918,7 +918,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
     }
 
     for (event = 0; event < VIR_NODE_DEVICE_EVENT_ID_LAST; event++)
-        if (STREQ(eventName, virshNodedevEventCallbacks[event].name))
+        if (STREQ(eventName, virshNodeDeviceEventCallbacks[event].name))
             break;
     if (event == VIR_NODE_DEVICE_EVENT_ID_LAST) {
         vshError(ctl, _("unknown event type %s"), eventName);
@@ -929,7 +929,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
     data.loop = vshCommandOptBool(cmd, "loop");
     data.timestamp = vshCommandOptBool(cmd, "timestamp");
     data.count = 0;
-    data.cb = &virshNodedevEventCallbacks[event];
+    data.cb = &virshNodeDeviceEventCallbacks[event];
     if (vshCommandOptTimeoutToMs(ctl, cmd, &timeout) < 0)
         return false;
     if (vshCommandOptStringReq(ctl, cmd, "device", &device_value) < 0)
diff --git a/tools/virsh-nodedev.h b/tools/virsh-nodedev.h
index 9691b0db4d..95ff3bf526 100644
--- a/tools/virsh-nodedev.h
+++ b/tools/virsh-nodedev.h
@@ -22,12 +22,12 @@
 
 #include "virsh.h"
 
-struct virshNodedevEventCallback {
+struct virshNodeDeviceEventCallback {
     const char *name;
     virConnectNodeDeviceEventGenericCallback cb;
 };
-typedef struct virshNodedevEventCallback virshNodedevEventCallback;
+typedef struct virshNodeDeviceEventCallback virshNodeDeviceEventCallback;
 
-extern virshNodedevEventCallback virshNodedevEventCallbacks[];
+extern virshNodeDeviceEventCallback virshNodeDeviceEventCallbacks[];
 
 extern const vshCmdDef nodedevCmds[];
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux