c401cc
From 9e112021fcfa5bdcd042a74478ccfd5ff3ad0a33 Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <9e112021fcfa5bdcd042a74478ccfd5ff3ad0a33@dist-git>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Wed, 26 Feb 2014 14:54:46 +0100
c401cc
Subject: [PATCH] conf: Export disk source formatter and parser
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
c401cc
c401cc
This code will be reused in the snapshot disk definition parser.
c401cc
c401cc
(cherry picked from commit 5f86d11e4a54276aba34bfbe237bf79d0c97e2e7)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/conf/domain_conf.c |  4 ++--
c401cc
 src/conf/domain_conf.h | 20 ++++++++++++++++++++
c401cc
 2 files changed, 22 insertions(+), 2 deletions(-)
c401cc
c401cc
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
c401cc
index e4e3f6b..cec0236 100644
c401cc
--- a/src/conf/domain_conf.c
c401cc
+++ b/src/conf/domain_conf.c
c401cc
@@ -4832,7 +4832,7 @@ cleanup:
c401cc
 }
c401cc
 
c401cc
 
c401cc
-static int
c401cc
+int
c401cc
 virDomainDiskSourceDefParse(xmlNodePtr node,
c401cc
                             int type,
c401cc
                             char **source,
c401cc
@@ -14488,7 +14488,7 @@ virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf,
c401cc
     }
c401cc
 }
c401cc
 
c401cc
-static int
c401cc
+int
c401cc
 virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
c401cc
                                      int type,
c401cc
                                      const char *src,
c401cc
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
c401cc
index 0a4316b..fa81fa1 100644
c401cc
--- a/src/conf/domain_conf.h
c401cc
+++ b/src/conf/domain_conf.h
c401cc
@@ -2344,6 +2344,18 @@ int virDomainDefFormatInternal(virDomainDefPtr def,
c401cc
                                unsigned int flags,
c401cc
                                virBufferPtr buf);
c401cc
 
c401cc
+int virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
c401cc
+                                         int type,
c401cc
+                                         const char *src,
c401cc
+                                         int policy,
c401cc
+                                         int protocol,
c401cc
+                                         size_t nhosts,
c401cc
+                                         virDomainDiskHostDefPtr hosts,
c401cc
+                                         size_t nseclabels,
c401cc
+                                         virSecurityDeviceLabelDefPtr *seclabels,
c401cc
+                                         virDomainDiskSourcePoolDefPtr srcpool,
c401cc
+                                         unsigned int flags);
c401cc
+
c401cc
 int virDomainDefCompatibleDevice(virDomainDefPtr def,
c401cc
                                  virDomainDeviceDefPtr dev);
c401cc
 
c401cc
@@ -2377,6 +2389,14 @@ virDomainDiskDefPtr
c401cc
 virDomainDiskRemove(virDomainDefPtr def, size_t i);
c401cc
 virDomainDiskDefPtr
c401cc
 virDomainDiskRemoveByName(virDomainDefPtr def, const char *name);
c401cc
+int virDomainDiskSourceDefParse(xmlNodePtr node,
c401cc
+                                int type,
c401cc
+                                char **source,
c401cc
+                                int *proto,
c401cc
+                                size_t *nhosts,
c401cc
+                                virDomainDiskHostDefPtr *hosts,
c401cc
+                                virDomainDiskSourcePoolDefPtr *srcpool);
c401cc
+
c401cc
 bool virDomainHasDiskMirror(virDomainObjPtr vm);
c401cc
 
c401cc
 int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net);
c401cc
-- 
c401cc
1.9.0
c401cc