From patchwork Wed Feb 24 17:55:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC,37/48] error: New QERR_BAD_BUS_FOR_DEVICE Date: Wed, 24 Feb 2010 07:55:49 -0000 From: Markus Armbruster X-Patchwork-Id: 46191 Message-Id: <1267034160-3517-38-git-send-email-armbru@redhat.com> To: qemu-devel@nongnu.org Signed-off-by: Markus Armbruster --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 7ebc2bb..4761ae5 100644 --- a/qerror.c +++ b/qerror.c @@ -41,6 +41,10 @@ static const QType qerror_type = { */ static const QErrorStringTable qerror_table[] = { { + .error_fmt = QERR_BAD_BUS_FOR_DEVICE, + .desc = "Device '%(device)' can't go on a %(bad_bus_type) bus", + }, + { .error_fmt = QERR_BUS_NOT_FOUND, .desc = "Bus '%(bus)' not found", }, diff --git a/qerror.h b/qerror.h index e65f1f2..8433d84 100644 --- a/qerror.h +++ b/qerror.h @@ -42,6 +42,9 @@ QError *qobject_to_qerror(const QObject *obj); /* * QError class list */ +#define QERR_BAD_BUS_FOR_DEVICE \ + "{ 'class': 'BadBusForDevice', 'data': { 'device': %s, 'bad_bus_type': %s } }" + #define QERR_BUS_NOT_FOUND \ "{ 'class': 'BusNotFound', 'data': { 'bus': %s } }"