[libvirt] [PATCH 4/7] Move virStoragePerms to libvirt_util

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

 



Rename to virStorageFilePerms and move to util/storage_file.[ch]

* src/conf/storage_conf.h: move perms struct from here ...

* src/util/storage_file.h: ... to here

* src/conf/storage_conf.c: update
---
 src/conf/storage_conf.c |    2 +-
 src/conf/storage_conf.h |   18 +++---------------
 src/util/storage_file.h |    9 +++++++++
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 788de15..dc6171c 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -387,7 +387,7 @@ virStoragePoolDefParseAuthChap(virConnectPtr conn,
 static int
 virStorageDefParsePerms(virConnectPtr conn,
                         xmlXPathContextPtr ctxt,
-                        virStoragePermsPtr perms,
+                        virStorageFilePermsPtr perms,
                         const char *permxpath,
                         int defaultmode) {
     char *mode;
diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h
index 7f63fbc..9353cf5 100644
--- a/src/conf/storage_conf.h
+++ b/src/conf/storage_conf.h
@@ -27,23 +27,11 @@
 #include "internal.h"
 #include "util.h"
 #include "storage_encryption.h"
+#include "storage_file.h"
 #include "threads.h"
 
 #include <libxml/tree.h>
 
-/* Shared structs */
-
-
-
-typedef struct _virStoragePerms virStoragePerms;
-typedef virStoragePerms *virStoragePermsPtr;
-struct _virStoragePerms {
-    int mode;
-    int uid;
-    int gid;
-    char *label;
-};
-
 /* Storage volumes */
 
 
@@ -76,7 +64,7 @@ typedef virStorageVolTarget *virStorageVolTargetPtr;
 struct _virStorageVolTarget {
     char *path;
     int format;
-    virStoragePerms perms;
+    virStorageFilePerms perms;
     int type; /* only used by disk backend for partition type */
     /* Currently used only in virStorageVolDef.target, not in .backingstore. */
     virStorageEncryptionPtr encryption;
@@ -236,7 +224,7 @@ typedef struct _virStoragePoolTarget virStoragePoolTarget;
 typedef virStoragePoolTarget *virStoragePoolTargetPtr;
 struct _virStoragePoolTarget {
     char *path;                /* Optional local filesystem mapping */
-    virStoragePerms perms;     /* Default permissions for volumes */
+    virStorageFilePerms perms; /* Default permissions for volumes */
 };
 
 
diff --git a/src/util/storage_file.h b/src/util/storage_file.h
index 7bccbe4..e2f1478 100644
--- a/src/util/storage_file.h
+++ b/src/util/storage_file.h
@@ -43,4 +43,13 @@ enum virStorageFileFormat {
 
 VIR_ENUM_DECL(virStorageFileFormat);
 
+typedef struct _virStorageFilePerms virStorageFilePerms;
+typedef virStorageFilePerms *virStorageFilePermsPtr;
+struct _virStorageFilePerms {
+    int mode;
+    int uid;
+    int gid;
+    char *label;
+};
+
 #endif /* __VIR_STORAGE_FILE_H__ */
-- 
1.6.2.5

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