From patchwork Mon Apr 5 20:33:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [05/21] error: New QERR_DUPLICATE_ID From: Luiz Capitulino X-Patchwork-Id: 49437 Message-Id: <1270499642-31543-6-git-send-email-lcapitulino@redhat.com> To: aliguori@us.ibm.com Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Date: Mon, 5 Apr 2010 17:33:46 -0300 From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 4520b0d..9fb817e 100644 --- a/qerror.c +++ b/qerror.c @@ -97,6 +97,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' has no child bus", }, { + .error_fmt = QERR_DUPLICATE_ID, + .desc = "Duplicate ID '%(id)' for %(object)", + }, + { .error_fmt = QERR_FD_NOT_FOUND, .desc = "File descriptor named '%(name)' not found", }, diff --git a/qerror.h b/qerror.h index a2664ab..870cdc3 100644 --- a/qerror.h +++ b/qerror.h @@ -88,6 +88,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_NO_BUS \ "{ 'class': 'DeviceNoBus', 'data': { 'device': %s } }" +#define QERR_DUPLICATE_ID \ + "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }" + #define QERR_FD_NOT_FOUND \ "{ 'class': 'FdNotFound', 'data': { 'name': %s } }"