diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-12-02 14:58:12 -0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-03-15 10:39:51 -0300 |
commit | a4acc064f7054877aeffe0ea27a492b15086b833 (patch) | |
tree | ce75a65c7cd4ce8052bafabf6f6787c04f647aca | |
parent | ae7d54d489540b49b7c13a7df7ddc220588a2ced (diff) | |
download | qemu-a4acc064f7054877aeffe0ea27a492b15086b833.tar.gz qemu-a4acc064f7054877aeffe0ea27a492b15086b833.tar.bz2 qemu-a4acc064f7054877aeffe0ea27a492b15086b833.zip |
QError: Introduce new errors for the migration command
The new errors are QERR_MIGRATION_ACTIVE and QERR_MIGRATION_NOT_SUPPORTED,
which are going to be used by the QAPI converted migration command.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r-- | qerror.c | 8 | ||||
-rw-r--r-- | qerror.h | 6 |
2 files changed, 14 insertions, 0 deletions
@@ -193,6 +193,14 @@ static const QErrorStringTable qerror_table[] = { .desc = "Using KVM without %(capability), %(feature) unavailable", }, { + .error_fmt = QERR_MIGRATION_ACTIVE, + .desc = "There's a migration process in progress", + }, + { + .error_fmt = QERR_MIGRATION_NOT_SUPPORTED, + .desc = "State blocked by non-migratable device '%(device)'", + }, + { .error_fmt = QERR_MIGRATION_EXPECTED, .desc = "An incoming migration is expected before this command can be executed", }, @@ -166,6 +166,12 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_KVM_MISSING_CAP \ "{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }" +#define QERR_MIGRATION_ACTIVE \ + "{ 'class': 'MigrationActive', 'data': {} }" + +#define QERR_MIGRATION_NOT_SUPPORTED \ + "{ 'class': 'MigrationNotSupported', 'data': {'device': %s} }" + #define QERR_MIGRATION_EXPECTED \ "{ 'class': 'MigrationExpected', 'data': {} }" |