Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/libvirt_private.syms | 1 +
src/util/virerror.c | 12 +++++++++---
src/util/virerror.h | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index c550310..c4f70f1 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1700,6 +1700,7 @@ ebtablesRemoveForwardAllowIn;
# util/virerror.h
+virCopyError;
virDispatchError;
virErrorCopyNew;
virErrorInitialize;
diff --git a/src/util/virerror.c b/src/util/virerror.c
index c000b00..2ff8a3e 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -188,10 +188,16 @@ virErrorGenericFailure(virErrorPtr err)
}
-/*
- * Internal helper to perform a deep copy of an error
+/**
+ * virCopyError:
+ * @from: error to copy from
+ * @to: error to copy to
+ *
+ * Copy error fields from @from to @to.
+ *
+ * Returns 0 on success, -1 on failure.
*/
-static int
+int
virCopyError(virErrorPtr from,
virErrorPtr to)
{
diff --git a/src/util/virerror.h b/src/util/virerror.h
index 760bfa4..90ac619 100644
--- a/src/util/virerror.h
+++ b/src/util/virerror.h
@@ -192,6 +192,7 @@ void virReportOOMErrorFull(int domcode,
int virSetError(virErrorPtr newerr);
virErrorPtr virErrorCopyNew(virErrorPtr err);
+int virCopyError(virErrorPtr from, virErrorPtr to);
void virDispatchError(virConnectPtr conn);
const char *virStrerror(int theerrno, char *errBuf, size_t errBufLen);
--
1.8.3.1