[V2,2/3] qerror: Add error telling that streaming blocks migration

Submitted by Benoit Canet on July 23, 2012, 11:23 a.m.

Details

Message ID 1343042615-5013-3-git-send-email-benoit@irqsave.net
State New
Headers show

Commit Message

Benoit Canet July 23, 2012, 11:23 a.m.
From: BenoƮt Canet <benoit@irqsave.net>

Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+)

Comments

Peter Maydell July 23, 2012, 11:30 a.m.
On 23 July 2012 12:23,  <benoit.canet@gmail.com> wrote:
> --- a/qerror.c
> +++ b/qerror.c
> @@ -283,6 +283,10 @@ static const QErrorStringTable qerror_table[] = {
>          .desc      = "Could not set password",
>      },
>      {
> +        .error_fmt = QERR_STREAMING_BLOCKS_MIGRATION,
> +        .desc      = "Streaming blocks migration",
> +    },

An error should be a description of something that went wrong
("this isn't supported", "I couldn't do X", "couldn't find Y",
"that isn't valid on devices of type Z"). This text isn't
describing anything that's gone wrong in any comprehensible
way.

In particular I just parsed "Streaming blocks migration"
as "(streaming blocks) migration" ie "migration of
streaming blocks". If you meant "Migration was blocked
by streaming" or something similar you need to rephrase.

-- PMM

Patch hide | download patch | download mbox

diff --git a/qerror.c b/qerror.c
index 92c4eff..bcd74b7 100644
--- a/qerror.c
+++ b/qerror.c
@@ -283,6 +283,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Could not set password",
     },
     {
+        .error_fmt = QERR_STREAMING_BLOCKS_MIGRATION,
+        .desc      = "Streaming blocks migration",
+    },
+    {
         .error_fmt = QERR_TOO_MANY_FILES,
         .desc      = "Too many open files",
     },
diff --git a/qerror.h b/qerror.h
index b4c8758..95d9e8d 100644
--- a/qerror.h
+++ b/qerror.h
@@ -233,6 +233,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_SET_PASSWD_FAILED \
     "{ 'class': 'SetPasswdFailed', 'data': {} }"
 
+#define QERR_STREAMING_BLOCKS_MIGRATION \
+    "{ 'class': 'StreamingFeatureBlocksMigration', 'data': {} }"
+
 #define QERR_TOO_MANY_FILES \
     "{ 'class': 'TooManyFiles', 'data': {} }"