qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/6] qerror: add QERR_OVERFLOW


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v2 1/6] qerror: add QERR_OVERFLOW
Date: Mon, 04 Jun 2012 13:27:02 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 06/02/2012 06:54 AM, Amos Kong wrote:
Signed-off-by: Amos Kong<address@hidden>

I think QERR_INVALID_PARAMETER_VALUE is a more logical choice for the error you're generating.

Regards,

Anthony Liguori

---
  qerror.c |    4 ++++
  qerror.h |    3 +++
  2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/qerror.c b/qerror.c
index 5092fe7..b66af09 100644
--- a/qerror.c
+++ b/qerror.c
@@ -172,6 +172,10 @@ static const QErrorStringTable qerror_table[] = {
          .desc      = "Parameter '%(name)' expects %(expected)",
      },
      {
+        .error_fmt = QERR_OVERFLOW,
+        .desc      = "Input is overflow",
+    },
+    {
          .error_fmt = QERR_INVALID_PASSWORD,
          .desc      = "Password incorrect",
      },
diff --git a/qerror.h b/qerror.h
index 4cbba48..dfe9c89 100644
--- a/qerror.h
+++ b/qerror.h
@@ -151,6 +151,9 @@ QError *qobject_to_qerror(const QObject *obj);
  #define QERR_INVALID_PARAMETER_VALUE \
      "{ 'class': 'InvalidParameterValue', 'data': { 'name': %s, 'expected': %s } 
}"

+#define QERR_OVERFLOW \
+    "{ 'class': 'Overflow', 'data': {} }"
+
  #define QERR_INVALID_PASSWORD \
      "{ 'class': 'InvalidPassword', 'data': {} }"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]