[libvirt PATCH v2 01/12] util: use consistent naming for swtpm global variables

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

 



Use a '_path' suffix on all vars which are paths.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/util/virtpm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/util/virtpm.c b/src/util/virtpm.c
index 2c0dd707b0..d5d80aa9dc 100644
--- a/src/util/virtpm.c
+++ b/src/util/virtpm.c
@@ -100,11 +100,11 @@ static char *swtpm_path;
 static struct stat swtpm_stat;
 static virBitmap *swtpm_caps;
 
-static char *swtpm_setup;
+static char *swtpm_setup_path;
 static struct stat swtpm_setup_stat;
 static virBitmap *swtpm_setup_caps;
 
-static char *swtpm_ioctl;
+static char *swtpm_ioctl_path;
 static struct stat swtpm_ioctl_stat;
 
 typedef int (*TypeFromStringFn)(const char *);
@@ -129,11 +129,11 @@ virTPMGetSwtpmSetup(void)
 {
     char *s;
 
-    if (!swtpm_setup && virTPMEmulatorInit() < 0)
+    if (!swtpm_setup_path && virTPMEmulatorInit() < 0)
         return NULL;
 
     virMutexLock(&swtpm_tools_lock);
-    s = g_strdup(swtpm_setup);
+    s = g_strdup(swtpm_setup_path);
     virMutexUnlock(&swtpm_tools_lock);
 
     return s;
@@ -144,11 +144,11 @@ virTPMGetSwtpmIoctl(void)
 {
     char *s;
 
-    if (!swtpm_ioctl && virTPMEmulatorInit() < 0)
+    if (!swtpm_ioctl_path && virTPMEmulatorInit() < 0)
         return NULL;
 
     virMutexLock(&swtpm_tools_lock);
-    s = g_strdup(swtpm_ioctl);
+    s = g_strdup(swtpm_ioctl_path);
     virMutexUnlock(&swtpm_tools_lock);
 
     return s;
@@ -275,14 +275,14 @@ virTPMEmulatorInit(void)
         },
         {
             .name = "swtpm_setup",
-            .path = &swtpm_setup,
+            .path = &swtpm_setup_path,
             .stat = &swtpm_setup_stat,
             .caps = &swtpm_setup_caps,
             .typeFromStringFn = virTPMSwtpmSetupFeatureTypeFromString,
         },
         {
             .name = "swtpm_ioctl",
-            .path = &swtpm_ioctl,
+            .path = &swtpm_ioctl_path,
             .stat = &swtpm_ioctl_stat,
         }
     };
-- 
2.33.1




[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