[PATCH v6 2/4] util: Add member ns to the storage source struct

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

 



The member ns will be used to store the namespace string.

Signed-off-by: Han Han <hhan@xxxxxxxxxx>
---
 src/util/virstoragefile.c | 2 ++
 src/util/virstoragefile.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 82388ae544..38953324ee 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2375,6 +2375,7 @@ virStorageSourceCopy(const virStorageSource *src,
 
     def->path = g_strdup(src->path);
     def->volume = g_strdup(src->volume);
+    def->ns = g_strdup(src->ns);
     def->relPath = g_strdup(src->relPath);
     def->backingStoreRaw = g_strdup(src->backingStoreRaw);
     def->backingStoreRawFormat = src->backingStoreRawFormat;
@@ -2655,6 +2656,7 @@ virStorageSourceClear(virStorageSourcePtr def)
 
     VIR_FREE(def->path);
     VIR_FREE(def->volume);
+    VIR_FREE(def->ns);
     VIR_FREE(def->snapshot);
     VIR_FREE(def->configFile);
     VIR_FREE(def->query);
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 87763cf389..8a6ddef8bf 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -284,6 +284,7 @@ struct _virStorageSource {
     char *snapshot; /* for storage systems supporting internal snapshots */
     char *configFile; /* some storage systems use config file as part of
                          the source definition */
+    char *ns; /* for the storage systems supporting namespace */
     char *query; /* query string for HTTP based protocols */
     size_t nhosts;
     virStorageNetHostDefPtr hosts;
-- 
2.26.2




[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