[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/35] blockdev: fix drive-mirror 'granularity' error
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 11/35] blockdev: fix drive-mirror 'granularity' error message |
Date: |
Fri, 29 Aug 2014 17:29:39 +0100 |
Name the 'granularity' parameter and give its expected value range.
Previously the device name was mistakenly reported as the parameter
name.
Note that the error class is unchanged from ERROR_CLASS_GENERIC_ERROR.
Reported-by: Eric Blake <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoît Canet <address@hidden>
---
blockdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 6a204c6..eeb414e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2179,11 +2179,12 @@ void qmp_drive_mirror(const char *device, const char
*target,
}
if (granularity != 0 && (granularity < 512 || granularity > 1048576 * 64))
{
- error_set(errp, QERR_INVALID_PARAMETER, device);
+ error_set(errp, QERR_INVALID_PARAMETER_VALUE, "granularity",
+ "a value in range [512B, 64MB]");
return;
}
if (granularity & (granularity - 1)) {
- error_set(errp, QERR_INVALID_PARAMETER, device);
+ error_set(errp, QERR_INVALID_PARAMETER_VALUE, "granularity", "power of
2");
return;
}
--
1.9.3
- [Qemu-devel] [PULL 00/35] Block patches, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 01/35] ide: Fix bootindex for bus_id > 9, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 02/35] block.curl: adding 'timeout' option, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 03/35] qemu-img: fix img_commit() error return value, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 04/35] qemu-img: fix img_compare() flags error path, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 05/35] qemu-img: always goto out in img_snapshot() error paths, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 08/35] qapi: add read-pattern enum for quorum, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 10/35] coroutine: Drop co_sleep_ns, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 09/35] block/quorum: add simple read pattern support, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 11/35] blockdev: fix drive-mirror 'granularity' error message,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 12/35] AioContext: take bottom halves into account when computing aio_poll timeout, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 07/35] sheepdog: improve error handling for a case of failed lock, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 13/35] aio-win32: Evaluate timers after handles, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 06/35] sheepdog: adopting protocol update for VDI locking, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 14/35] aio-win32: Factor out duplicate code into aio_dispatch_handlers, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 15/35] AioContext: run bottom halves after polling, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 16/35] AioContext: export and use aio_dispatch, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 17/35] test-aio: test timers on Windows too, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 18/35] aio-win32: add aio_set_dispatching optimization, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 19/35] AioContext: introduce aio_prepare, Stefan Hajnoczi, 2014/08/29