]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Sep 2012 15:22:44 +0000 (17:22 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Sep 2012 17:08:17 +0000 (19:08 +0200)
The DeviceNotActive text is not a particularly good match, add
a separate text while keeping the same class.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c
qerror.h

index cea22e4978026b7e42168380327e079c8214c152..d82461208984937b3efce5895772b95655126655 100644 (file)
@@ -1205,7 +1205,7 @@ void qmp_block_job_set_speed(const char *device, int64_t speed, Error **errp)
     BlockJob *job = find_block_job(device);
 
     if (!job) {
-        error_set(errp, QERR_DEVICE_NOT_ACTIVE, device);
+        error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device);
         return;
     }
 
@@ -1217,7 +1217,7 @@ void qmp_block_job_cancel(const char *device, Error **errp)
     BlockJob *job = find_block_job(device);
 
     if (!job) {
-        error_set(errp, QERR_DEVICE_NOT_ACTIVE, device);
+        error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device);
         return;
     }
 
index d0a76a4f71bfd051672ad63446ba7cc51e8579f8..485c7736623ac740cf6f0d4eb54e9d23bc1aaa8b 100644 (file)
--- a/qerror.h
+++ b/qerror.h
@@ -48,6 +48,9 @@ void assert_no_error(Error *err);
 #define QERR_BASE_NOT_FOUND \
     ERROR_CLASS_GENERIC_ERROR, "Base '%s' not found"
 
+#define QERR_BLOCK_JOB_NOT_ACTIVE \
+    ERROR_CLASS_DEVICE_NOT_ACTIVE, "No active block job on device '%s'"
+
 #define QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED \
     ERROR_CLASS_GENERIC_ERROR, "Block format '%s' used by device '%s' does not support feature '%s'"