diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-01-04 22:23:34 +0000 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-01-18 10:23:39 -0200 |
commit | 939a1cc399adb92640d156097d528b6471c136ae (patch) | |
tree | e459b5524103a382b7a271ab992c6fad7ac6298b /qerror.c | |
parent | c1303596a196613f1a765f8a536319577b2bb844 (diff) | |
download | qemu-939a1cc399adb92640d156097d528b6471c136ae.zip qemu-939a1cc399adb92640d156097d528b6471c136ae.tar.gz qemu-939a1cc399adb92640d156097d528b6471c136ae.tar.bz2 |
block: use proper qerrors in qmp_block_resize
Let's report specific errors so that management tools and users can
identify the problem.
Two new qerrors are needed:
* QERR_DEVICE_HAS_NO_MEDIUM for ENOMEDIUM
* QERR_DEVICE_IS_READ_ONLY for EACCES
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qerror.c')
-rw-r--r-- | qerror.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -80,6 +80,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Migration is disabled when using feature '%(feature)' in device '%(device)'", }, { + .error_fmt = QERR_DEVICE_HAS_NO_MEDIUM, + .desc = "Device '%(device)' has no medium", + }, + { .error_fmt = QERR_DEVICE_INIT_FAILED, .desc = "Device '%(device)' could not be initialized", }, @@ -88,6 +92,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' is in use", }, { + .error_fmt = QERR_DEVICE_IS_READ_ONLY, + .desc = "Device '%(device)' is read only", + }, + { .error_fmt = QERR_DEVICE_LOCKED, .desc = "Device '%(device)' is locked", }, |