From patchwork Thu Mar 4 15:56:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 46955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E6491B7CEF for ; Fri, 5 Mar 2010 04:25:05 +1100 (EST) Received: from localhost ([127.0.0.1]:55393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnEnE-0003ri-Gw for incoming@patchwork.ozlabs.org; Thu, 04 Mar 2010 12:25:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnDXb-0005j1-V6 for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:48 -0500 Received: from [199.232.76.173] (port=58589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnDXb-0005iZ-3Y for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:47 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnDXR-0001Qq-Iw for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:46 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:47487) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NnDXO-0001PT-UR for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:35 -0500 Received: from blackfin.pond.sub.org (pD9E38041.dip.t-dialin.net [217.227.128.65]) by oxygen.pond.sub.org (Postfix) with ESMTPA id D63ED2DD324 for ; Thu, 4 Mar 2010 17:04:30 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id A6D7416F; Thu, 4 Mar 2010 16:57:13 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 4 Mar 2010 16:56:50 +0100 Message-Id: <1267718231-13303-30-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1267718231-13303-1-git-send-email-armbru@redhat.com> References: <1267718231-13303-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Luiz Capitulino Subject: [Qemu-devel] [PATCH 29/50] error: Polish human-readable error descriptions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Also put error definitions in alphabetical order Signed-off-by: Markus Armbruster --- qerror.c | 28 ++++++++++++++-------------- qerror.h | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/qerror.c b/qerror.c index b400480..41ff946 100644 --- a/qerror.c +++ b/qerror.c @@ -46,43 +46,39 @@ static const QErrorStringTable qerror_table[] = { }, { .error_fmt = QERR_DEVICE_ENCRYPTED, - .desc = "The %(device) is encrypted", + .desc = "Device '%(device)' is encrypted", }, { .error_fmt = QERR_DEVICE_LOCKED, - .desc = "Device %(device) is locked", + .desc = "Device '%(device)' is locked", }, { .error_fmt = QERR_DEVICE_NOT_ACTIVE, - .desc = "The %(device) device has not been activated by the guest", + .desc = "Device '%(device)' has not been activated by the guest", }, { .error_fmt = QERR_DEVICE_NOT_FOUND, - .desc = "The %(device) device has not been found", + .desc = "Device '%(device)' not found", }, { .error_fmt = QERR_DEVICE_NOT_REMOVABLE, - .desc = "Device %(device) is not removable", + .desc = "Device '%(device)' is not removable", }, { .error_fmt = QERR_FD_NOT_FOUND, - .desc = "Failed to find file descriptor named %(name)", + .desc = "File descriptor named '%(name)' not found", }, { .error_fmt = QERR_FD_NOT_SUPPLIED, .desc = "No file descriptor supplied via SCM_RIGHTS", }, { - .error_fmt = QERR_OPEN_FILE_FAILED, - .desc = "Could not open '%(filename)'", - }, - { .error_fmt = QERR_INVALID_BLOCK_FORMAT, - .desc = "Invalid block format %(name)", + .desc = "Invalid block format '%(name)'", }, { .error_fmt = QERR_INVALID_PARAMETER, - .desc = "Invalid parameter %(name)", + .desc = "Invalid parameter '%(name)'", }, { .error_fmt = QERR_INVALID_PARAMETER_TYPE, @@ -90,7 +86,7 @@ static const QErrorStringTable qerror_table[] = { }, { .error_fmt = QERR_INVALID_PASSWORD, - .desc = "The entered password is invalid", + .desc = "Password incorrect", }, { .error_fmt = QERR_JSON_PARSING, @@ -102,7 +98,11 @@ static const QErrorStringTable qerror_table[] = { }, { .error_fmt = QERR_MISSING_PARAMETER, - .desc = "Parameter %(name) is missing", + .desc = "Parameter '%(name)' is missing", + }, + { + .error_fmt = QERR_OPEN_FILE_FAILED, + .desc = "Could not open '%(filename)'", }, { .error_fmt = QERR_QMP_BAD_INPUT_OBJECT, diff --git a/qerror.h b/qerror.h index f25be1b..8060fe0 100644 --- a/qerror.h +++ b/qerror.h @@ -48,7 +48,7 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_ENCRYPTED \ "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }" -#define QERR_DEVICE_LOCKED \ +#define QERR_DEVICE_LOCKED \ "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }" #define QERR_DEVICE_NOT_ACTIVE \ @@ -66,9 +66,6 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_FD_NOT_SUPPLIED \ "{ 'class': 'FdNotSupplied', 'data': {} }" -#define QERR_OPEN_FILE_FAILED \ - "{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }" - #define QERR_INVALID_BLOCK_FORMAT \ "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }" @@ -90,18 +87,21 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_MISSING_PARAMETER \ "{ 'class': 'MissingParameter', 'data': { 'name': %s } }" +#define QERR_OPEN_FILE_FAILED \ + "{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }" + #define QERR_QMP_BAD_INPUT_OBJECT \ "{ 'class': 'QMPBadInputObject', 'data': { 'expected': %s } }" #define QERR_SET_PASSWD_FAILED \ "{ 'class': 'SetPasswdFailed', 'data': {} }" -#define QERR_UNDEFINED_ERROR \ - "{ 'class': 'UndefinedError', 'data': {} }" - #define QERR_TOO_MANY_FILES \ "{ 'class': 'TooManyFiles', 'data': {} }" +#define QERR_UNDEFINED_ERROR \ + "{ 'class': 'UndefinedError', 'data': {} }" + #define QERR_VNC_SERVER_FAILED \ "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"