diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-03-19 08:51:06 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-03-19 08:51:06 -0500 |
commit | 5c20f4e54a311620861c659dec29d0ee402e8b93 (patch) | |
tree | 4e35db5155d8539650df69e629cc1a009ae54579 /error.c | |
parent | 46a5801d0cb5f5ed01a4d31c0e7cc581237ed5ce (diff) | |
parent | e1c37d0e94048502f9874e6356ce7136d4b05bdb (diff) |
Merge remote-tracking branch 'qmp/queue/qmp' into staging
* qmp/queue/qmp:
qapi: Convert migrate
Purge migration of (almost) everything to do with monitors
Error: Introduce error_copy()
QError: Introduce new errors for the migration command
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -43,6 +43,19 @@ void error_set(Error **errp, const char *fmt, ...) *errp = err; } +Error *error_copy(const Error *err) +{ + Error *err_new; + + err_new = g_malloc0(sizeof(*err)); + err_new->msg = g_strdup(err->msg); + err_new->fmt = err->fmt; + err_new->obj = err->obj; + QINCREF(err_new->obj); + + return err_new; +} + bool error_is_set(Error **errp) { return (errp && *errp); |