mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
QError: Add class for invalid passwords
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
6d9fef1a02
commit
f6d855c50d
2 changed files with 7 additions and 0 deletions
4
qerror.c
4
qerror.c
|
@ -56,6 +56,10 @@ static const QErrorStringTable qerror_table[] = {
|
||||||
.error_fmt = QERR_INVALID_PARAMETER_TYPE,
|
.error_fmt = QERR_INVALID_PARAMETER_TYPE,
|
||||||
.desc = "Invalid parameter type, expected: %(expected)",
|
.desc = "Invalid parameter type, expected: %(expected)",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.error_fmt = QERR_INVALID_PASSWORD,
|
||||||
|
.desc = "The entered password is invalid",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.error_fmt = QERR_KVM_MISSING_CAP,
|
.error_fmt = QERR_KVM_MISSING_CAP,
|
||||||
.desc = "Using KVM without %(capability), %(feature) unavailable",
|
.desc = "Using KVM without %(capability), %(feature) unavailable",
|
||||||
|
|
3
qerror.h
3
qerror.h
|
@ -50,6 +50,9 @@ QError *qobject_to_qerror(const QObject *obj);
|
||||||
#define QERR_INVALID_PARAMETER_TYPE \
|
#define QERR_INVALID_PARAMETER_TYPE \
|
||||||
"{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }"
|
"{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }"
|
||||||
|
|
||||||
|
#define QERR_INVALID_PASSWORD \
|
||||||
|
"{ 'class': 'InvalidPassword', 'data': {} }"
|
||||||
|
|
||||||
#define QERR_KVM_MISSING_CAP \
|
#define QERR_KVM_MISSING_CAP \
|
||||||
"{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }"
|
"{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue