Patchwork [1/2] QError: New QERR_DEVICE_NOT_ENCRYPTED

login
register
mail settings
Submitter Shahar Havivi
Date March 5, 2010, 10:25 p.m.
Message ID <fb6a8be110590fa6e67c23dced166a5fc5c7a0aa.1267827125.git.shaharh@redhat.com>
Download mbox | patch
Permalink /patch/47033/
State New
Headers show

Comments

Shahar Havivi - March 5, 2010, 10:25 p.m.
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
Anthony Liguori - March 17, 2010, 4:20 p.m.
On 03/05/2010 04:25 PM, Shahar Havivi wrote:
> Signed-off-by: Shahar Havivi<shaharh@redhat.com>
>    
Applied.  Thanks.

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 2f657f4..4e63a54 100644
> --- a/qerror.c
> +++ b/qerror.c
> @@ -49,6 +49,10 @@ static const QErrorStringTable qerror_table[] = {
>           .desc      = "The %(device) is encrypted",
>       },
>       {
> +        .error_fmt = QERR_DEVICE_NOT_ENCRYPTED,
> +        .desc      = "Device '%(device)' is not encrypted",
> +    },
> +    {
>           .error_fmt = QERR_DEVICE_LOCKED,
>           .desc      = "Device %(device) is locked",
>       },
> diff --git a/qerror.h b/qerror.h
> index ee59615..b93fff6 100644
> --- a/qerror.h
> +++ b/qerror.h
> @@ -46,6 +46,9 @@ QError *qobject_to_qerror(const QObject *obj);
>   #define QERR_DEVICE_ENCRYPTED \
>       "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
>
> +#define QERR_DEVICE_NOT_ENCRYPTED \
> +    "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }"
> +
>   #define QERR_DEVICE_LOCKED                                      \
>       "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }"
>
>

Patch

diff --git a/qerror.c b/qerror.c
index 2f657f4..4e63a54 100644
--- a/qerror.c
+++ b/qerror.c
@@ -49,6 +49,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "The %(device) is encrypted",
     },
     {
+        .error_fmt = QERR_DEVICE_NOT_ENCRYPTED,
+        .desc      = "Device '%(device)' is not encrypted",
+    },
+    {
         .error_fmt = QERR_DEVICE_LOCKED,
         .desc      = "Device %(device) is locked",
     },
diff --git a/qerror.h b/qerror.h
index ee59615..b93fff6 100644
--- a/qerror.h
+++ b/qerror.h
@@ -46,6 +46,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_ENCRYPTED \
     "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_NOT_ENCRYPTED \
+    "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }"
+
 #define QERR_DEVICE_LOCKED                                      \
     "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }"