From patchwork Tue Jul 31 05:16:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC, 3/4] qerror: new errors for live block commit, QERR_TOP_NOT_FOUND Date: Mon, 30 Jul 2012 19:16:12 -0000 From: Jeff Cody X-Patchwork-Id: 174143 Message-Id: <6fa5167365c66d4c450000e86c34b77db0bd2288.1343710713.git.jcody@redhat.com> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@gmail.com, supriyak@linux.vnet.ibm.com Signed-off-by: Jeff Cody --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 25c2733..69a59ab 100644 --- a/qerror.c +++ b/qerror.c @@ -307,6 +307,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Too many open files", }, { + .error_fmt = QERR_TOP_NOT_FOUND, + .desc = "Top '%(top)' not found", + }, + { .error_fmt = QERR_UNDEFINED_ERROR, .desc = "An undefined error has occurred", }, diff --git a/qerror.h b/qerror.h index 0f9f303..931c703 100644 --- a/qerror.h +++ b/qerror.h @@ -251,6 +251,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_TOO_MANY_FILES \ "{ 'class': 'TooManyFiles', 'data': {} }" +#define QERR_TOP_NOT_FOUND \ + "{ 'class': 'TopNotFound', 'data': { 'top': %s } }" + #define QERR_UNDEFINED_ERROR \ "{ 'class': 'UndefinedError', 'data': {} }"