[PATCH v2 01/14] util: Move virSecretUsageType to virsecret.h

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

 



Move the virSecretUsageType into the util.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/domain_conf.c        | 1 +
 src/conf/secret_conf.c        | 4 +---
 src/conf/secret_conf.h        | 2 --
 src/qemu/qemu_parse_command.c | 2 +-
 src/storage/storage_driver.c  | 1 +
 src/util/virsecret.c          | 2 ++
 src/util/virsecret.h          | 3 +++
 tools/virsh-secret.c          | 2 +-
 8 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cc5e79b70..8dca1357c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -53,6 +53,7 @@
 #include "device_conf.h"
 #include "network_conf.h"
 #include "virtpm.h"
+#include "virsecret.h"
 #include "virstring.h"
 #include "virnetdev.h"
 #include "virnetdevmacvlan.h"
diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c
index bd085b7e4..989705234 100644
--- a/src/conf/secret_conf.c
+++ b/src/conf/secret_conf.c
@@ -30,6 +30,7 @@
 #include "secret_conf.h"
 #include "virsecretobj.h"
 #include "virerror.h"
+#include "virsecret.h"
 #include "virstring.h"
 #include "virxml.h"
 #include "viruuid.h"
@@ -38,9 +39,6 @@
 
 VIR_LOG_INIT("conf.secret_conf");
 
-VIR_ENUM_IMPL(virSecretUsage, VIR_SECRET_USAGE_TYPE_LAST,
-              "none", "volume", "ceph", "iscsi", "tls")
-
 void
 virSecretDefFree(virSecretDefPtr def)
 {
diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h
index e0d9465a0..aa81651d4 100644
--- a/src/conf/secret_conf.h
+++ b/src/conf/secret_conf.h
@@ -26,8 +26,6 @@
 # include "internal.h"
 # include "virutil.h"
 
-VIR_ENUM_DECL(virSecretUsage)
-
 typedef struct _virSecretDef virSecretDef;
 typedef virSecretDef *virSecretDefPtr;
 struct _virSecretDef {
diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 8cb96a24a..ac9076190 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -28,9 +28,9 @@
 #include "dirname.h"
 #include "viralloc.h"
 #include "virlog.h"
+#include "virsecret.h"
 #include "virstring.h"
 #include "c-ctype.h"
-#include "secret_conf.h"
 
 #define VIR_FROM_THIS VIR_FROM_QEMU
 
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 7cf5943cb..59ccc8036 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -48,6 +48,7 @@
 #include "virfile.h"
 #include "virfdstream.h"
 #include "configmake.h"
+#include "virsecret.h"
 #include "virstring.h"
 #include "viraccessapicheck.h"
 //#include "dirname.h"
diff --git a/src/util/virsecret.c b/src/util/virsecret.c
index aded8028b..4dd19cdf5 100644
--- a/src/util/virsecret.c
+++ b/src/util/virsecret.c
@@ -32,6 +32,8 @@
 
 VIR_LOG_INIT("util.secret");
 
+VIR_ENUM_IMPL(virSecretUsage, VIR_SECRET_USAGE_TYPE_LAST,
+              "none", "volume", "ceph", "iscsi", "tls")
 
 void
 virSecretLookupDefClear(virSecretLookupTypeDefPtr def)
diff --git a/src/util/virsecret.h b/src/util/virsecret.h
index 4506fb36e..a56e0c0c5 100644
--- a/src/util/virsecret.h
+++ b/src/util/virsecret.h
@@ -24,8 +24,11 @@
 
 # include "internal.h"
 
+# include "virutil.h"
 # include "virxml.h"
 
+VIR_ENUM_DECL(virSecretUsage)
+
 typedef enum {
     VIR_SECRET_LOOKUP_TYPE_NONE,
     VIR_SECRET_LOOKUP_TYPE_UUID,
diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index cd788b687..52f067652 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -32,9 +32,9 @@
 #include "viralloc.h"
 #include "virfile.h"
 #include "virutil.h"
+#include "virsecret.h"
 #include "virstring.h"
 #include "virtime.h"
-#include "conf/secret_conf.h"
 
 static virSecretPtr
 virshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, const char **name)
-- 
2.13.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]
  Powered by Linux