]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: snapshot: Export virDomainSnapshotDiskDefParseXML
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Sep 2018 13:42:42 +0000 (15:42 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jul 2019 15:59:34 +0000 (17:59 +0200)
Allow using it from the tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/Makefile.inc.am
src/conf/snapshot_conf.c
src/conf/snapshot_conf_priv.h [new file with mode: 0644]

index 6b52ba674b5c67e47c8ea12151d2f93803a0f5db..16a21c34f3591d658f33d456faab245934de055d 100644 (file)
@@ -30,6 +30,7 @@ DOMAIN_CONF_SOURCES = \
        conf/moment_conf.h \
        conf/snapshot_conf.c \
        conf/snapshot_conf.h \
+       conf/snapshot_conf_priv.h \
        conf/numa_conf.c \
        conf/numa_conf.h \
        conf/virconftypes.h \
index 130a9cee03e9a6aa1d80caef87db75beaf1ac44e..eb04b11b5652b496acad754308ff4024504faa44 100644 (file)
@@ -47,6 +47,9 @@
 #include "virstring.h"
 #include "virdomainsnapshotobjlist.h"
 
+#define LIBVIRT_SNAPSHOT_CONF_PRIV_H_ALLOW
+#include "snapshot_conf_priv.h"
+
 #define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT
 
 VIR_LOG_INIT("conf.snapshot_conf");
@@ -122,7 +125,7 @@ virDomainSnapshotDefDispose(void *obj)
     virObjectUnref(def->cookie);
 }
 
-static int
+int
 virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
                                  xmlXPathContextPtr ctxt,
                                  virDomainSnapshotDiskDefPtr def,
diff --git a/src/conf/snapshot_conf_priv.h b/src/conf/snapshot_conf_priv.h
new file mode 100644 (file)
index 0000000..369a023
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * snapshot_conf_priv.h: domain snapshot XML processing (private)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBVIRT_SNAPSHOT_CONF_PRIV_H_ALLOW
+# error "snapshot_conf_priv.h may only be included by snapshot_conf.c or test suites"
+#endif /* LIBVIRT_SNAPSHOT_CONF_PRIV_H_ALLOW */
+
+#pragma once
+
+#include "snapshot_conf.h"
+
+int
+virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
+                                 xmlXPathContextPtr ctxt,
+                                 virDomainSnapshotDiskDefPtr def,
+                                 unsigned int flags,
+                                 virDomainXMLOptionPtr xmlopt);