From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGtz3-0008AQ-J3 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:57:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGtz1-0004Xm-T1 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:57:09 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:37650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGtz1-0004VJ-Mu for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:57:07 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so562435pad.4 for ; Wed, 26 Sep 2012 08:57:07 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 26 Sep 2012 17:56:07 +0200 Message-Id: <1348675011-8794-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1348675011-8794-1-git-send-email-pbonzini@redhat.com> References: <1348675011-8794-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 01/45] qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com The DeviceNotActive text is not a particularly good match, add a separate text while keeping the same class. Signed-off-by: Paolo Bonzini --- v1->v2: rebased for Error changes blockdev.c | 4 ++-- qerror.h | 3 +++ 2 file modificati, 5 inserzioni(+), 2 rimozioni(-) diff --git a/blockdev.c b/blockdev.c index e5d450f..de5457d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1142,7 +1142,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; } @@ -1154,7 +1154,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; } diff --git a/qerror.h b/qerror.h index d0a76a4..485c773 100644 --- 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'" -- 1.7.12