diff options
author | Cole Robinson <crobinso@redhat.com> | 2014-03-21 19:42:26 -0400 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-04-25 09:19:59 -0400 |
commit | f231b88db14f13ee9a41599896f57f3594c1ca8b (patch) | |
tree | cc9ae0ba27b5d6718fbc78eb26ae6b3bdea02f52 /blockdev.c | |
parent | d73f0beadb57f885e678bffc362864f4401262e0 (diff) |
qerror.h: Remove QERR defines that are only used once
Just hardcode them in the callers
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c index 09826f10cf..9486358e48 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1520,14 +1520,16 @@ static void eject_device(BlockDriverState *bs, int force, Error **errp) return; } if (!bdrv_dev_has_removable_media(bs)) { - error_set(errp, QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(bs)); + error_setg(errp, "Device '%s' is not removable", + bdrv_get_device_name(bs)); return; } if (bdrv_dev_is_medium_locked(bs) && !bdrv_dev_is_tray_open(bs)) { bdrv_dev_eject_request(bs, force); if (!force) { - error_set(errp, QERR_DEVICE_LOCKED, bdrv_get_device_name(bs)); + error_setg(errp, "Device '%s' is locked", + bdrv_get_device_name(bs)); return; } } @@ -2219,7 +2221,8 @@ void qmp_block_job_cancel(const char *device, return; } if (job->paused && !force) { - error_set(errp, QERR_BLOCK_JOB_PAUSED, device); + error_setg(errp, "The block job for device '%s' is currently paused", + device); return; } |