QError: new class for device encrypted errors

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Luiz Capitulino 2009-12-07 21:36:59 +01:00 committed by Anthony Liguori
parent ad382a1257
commit 0df37c411c
2 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,10 @@ static const QErrorStringTable qerror_table[] = {
.error_fmt = QERR_COMMAND_NOT_FOUND,
.desc = "The command %(name) has not been found",
},
{
.error_fmt = QERR_DEVICE_ENCRYPTED,
.desc = "The %(device) is encrypted",
},
{
.error_fmt = QERR_DEVICE_NOT_FOUND,
.desc = "The %(device) device has not been found",

View File

@ -41,6 +41,9 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_COMMAND_NOT_FOUND \
"{ 'class': 'CommandNotFound', 'data': { 'name': %s } }"
#define QERR_DEVICE_ENCRYPTED \
"{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
#define QERR_DEVICE_NOT_FOUND \
"{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"