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

[libvirt] [PATCH] qemuDomainGetPreservedMountPath: rename @mount



Obviously, old gcc-s ale sad when a variable shares the name with
a function. And we do have such variable (added in 4d8a914be0):
@mount. Rename it to @mountpoint so that compiler's happy again.

Signed-off-by: Michal Privoznik <mprivozn redhat com>
---

Pushed under build-breaker and trivial rules.

 src/qemu/qemu_domain.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e146bc88a..ae260de00 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7578,9 +7578,9 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
  * qemuDomainGetPreservedMountPath:
  * @cfg: driver configuration data
  * @vm: domain object
- * @mount: mount point path to convert
+ * @mountpoint: mount point path to convert
  *
- * For given @mount point return new path where the mount point
+ * For given @mountpoint return new path where the mount point
  * should be moved temporarily whilst building the namespace.
  *
  * Returns: allocated string on success which the caller must free,
@@ -7589,21 +7589,21 @@ qemuDomainGetHostdevPath(virDomainDefPtr def,
 static char *
 qemuDomainGetPreservedMountPath(virQEMUDriverConfigPtr cfg,
                                 virDomainObjPtr vm,
-                                const char *mount)
+                                const char *mountpoint)
 {
     char *path = NULL;
     char *tmp;
-    const char *suffix = mount + strlen(DEVPREFIX);
+    const char *suffix = mountpoint + strlen(DEVPREFIX);
     size_t off;
 
-    if (STREQ(mount, "/dev"))
+    if (STREQ(mountpoint, "/dev"))
         suffix = "dev";
 
     if (virAsprintf(&path, "%s/%s.%s",
                     cfg->stateDir, vm->def->name, suffix) < 0)
         return NULL;
 
-    /* Now consider that @mount is "/dev/blah/blah2".
+    /* Now consider that @mountpoint is "/dev/blah/blah2".
      * @suffix then points to "blah/blah2". However, caller
      * expects all the @paths to be the same depth. The
      * caller doesn't always do `mkdir -p` but sometimes bare
-- 
2.13.0


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