From 939a1cc399adb92640d156097d528b6471c136ae Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 4 Jan 2012 22:23:34 +0000 Subject: 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 Signed-off-by: Luiz Capitulino --- qerror.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qerror.h') diff --git a/qerror.h b/qerror.h index be4e8657aa..89160dd78e 100644 --- a/qerror.h +++ b/qerror.h @@ -81,12 +81,18 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_FEATURE_BLOCKS_MIGRATION \ "{ 'class': 'DeviceFeatureBlocksMigration', 'data': { 'device': %s, 'feature': %s } }" +#define QERR_DEVICE_HAS_NO_MEDIUM \ + "{ 'class': 'DeviceHasNoMedium', 'data': { 'device': %s } }" + #define QERR_DEVICE_INIT_FAILED \ "{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }" #define QERR_DEVICE_IN_USE \ "{ 'class': 'DeviceInUse', 'data': { 'device': %s } }" +#define QERR_DEVICE_IS_READ_ONLY \ + "{ 'class': 'DeviceIsReadOnly', 'data': { 'device': %s } }" + #define QERR_DEVICE_LOCKED \ "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }" -- cgit v1.2.1