[PATCH RFC 05/27] storage: gluster: Properly fix missing slashes in volume paths

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

 



Add a slash to the volume key so that the URI that is generated from it
will be formated properly. The extra slash doesn't hurt in the 'key'
attribute as we just need it to be unique.
---
 src/storage/storage_backend_gluster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
index 1be9034..36e99e9 100644
--- a/src/storage/storage_backend_gluster.c
+++ b/src/storage/storage_backend_gluster.c
@@ -222,7 +222,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,

     if (VIR_STRDUP(vol->name, name) < 0)
         goto cleanup;
-    if (virAsprintf(&vol->key, "%s%s%s", state->volname, state->dir,
+    if (virAsprintf(&vol->key, "/%s%s%s", state->volname, state->dir,
                     vol->name) < 0)
         goto cleanup;

-- 
1.8.5.1

--
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]