mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
Introduce virErrorCopyNew
A helper function for copying error objects. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
a7c22a1f29
commit
9d0a2af6c2
@ -102,6 +102,7 @@ ignored_functions = {
|
|||||||
"virDomainMigratePrepare3Params": "private function for migration",
|
"virDomainMigratePrepare3Params": "private function for migration",
|
||||||
"virDomainMigrateConfirm3Params": "private function for migration",
|
"virDomainMigrateConfirm3Params": "private function for migration",
|
||||||
"virDomainMigratePrepareTunnel3Params": "private function for tunnelled migration",
|
"virDomainMigratePrepareTunnel3Params": "private function for tunnelled migration",
|
||||||
|
"virErrorCopyNew": "private",
|
||||||
}
|
}
|
||||||
|
|
||||||
ignored_macros = {
|
ignored_macros = {
|
||||||
|
@ -1365,6 +1365,7 @@ ebtablesRemoveForwardAllowIn;
|
|||||||
|
|
||||||
# util/virerror.h
|
# util/virerror.h
|
||||||
virDispatchError;
|
virDispatchError;
|
||||||
|
virErrorCopyNew;
|
||||||
virErrorInitialize;
|
virErrorInitialize;
|
||||||
virErrorSetErrnoFromLastError;
|
virErrorSetErrnoFromLastError;
|
||||||
virLastErrorIsSystemErrno;
|
virLastErrorIsSystemErrno;
|
||||||
|
@ -214,6 +214,22 @@ virCopyError(virErrorPtr from,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virErrorPtr
|
||||||
|
virErrorCopyNew(virErrorPtr err)
|
||||||
|
{
|
||||||
|
virErrorPtr ret;
|
||||||
|
|
||||||
|
if (VIR_ALLOC_QUIET(ret) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (virCopyError(err, ret) < 0)
|
||||||
|
VIR_FREE(ret);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static virErrorPtr
|
static virErrorPtr
|
||||||
virLastErrorObject(void)
|
virLastErrorObject(void)
|
||||||
{
|
{
|
||||||
|
@ -185,6 +185,7 @@ void virReportOOMErrorFull(int domcode,
|
|||||||
virRaiseErrorObject(__FILE__, __FUNCTION__, __LINE__, obj)
|
virRaiseErrorObject(__FILE__, __FUNCTION__, __LINE__, obj)
|
||||||
|
|
||||||
int virSetError(virErrorPtr newerr);
|
int virSetError(virErrorPtr newerr);
|
||||||
|
virErrorPtr virErrorCopyNew(virErrorPtr err);
|
||||||
void virDispatchError(virConnectPtr conn);
|
void virDispatchError(virConnectPtr conn);
|
||||||
const char *virStrerror(int theerrno, char *errBuf, size_t errBufLen);
|
const char *virStrerror(int theerrno, char *errBuf, size_t errBufLen);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user