When hot-plugging a block device fails due to image locking errors,
users won't see the helpful 'Is another process using the image?'
message in QMP because currently the error hint is not carried over
there.
Even though extending QMP to include hint is a conceivably easy task,
Libvirt will need some change to consume that data.
Before that is fully sorted out, let's just do the easy fix by joining
the two lines.
Signed-off-by: Fam Zheng <address@hidden>
---
block/file-posix.c | 10 ++--
tests/qemu-iotests/153.out | 99 +++++++++++++-------------------------
tests/qemu-iotests/182.out | 3 +-
3 files changed, 38 insertions(+), 74 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 5a602cfe37..03776e13b1 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -699,11 +699,10 @@ static int raw_check_lock_bytes(BDRVRawState *s,
if (ret) {
char *perm_name = bdrv_perm_names(p);
error_setg(errp,
- "Failed to get \"%s\" lock",
+ "Failed to get \"%s\" lock. "
+ "Is another process using the image?",