[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/10] iscsi: Don't set error if already set in iscsi
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 01/10] iscsi: Don't set error if already set in iscsi_do_inquiry |
Date: |
Fri, 4 Apr 2014 21:27:40 +0200 |
From: Fam Zheng <address@hidden>
This eliminates the possible assertion failure in error_setg().
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/iscsi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 21c18a3..64a509f 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct
iscsi_context *iscsi, int lun,
return task;
fail:
- error_setg(errp, "iSCSI: Inquiry command failed : %s",
- iscsi_get_error(iscsi));
+ if (!error_is_set(errp)) {
+ error_setg(errp, "iSCSI: Inquiry command failed : %s",
+ iscsi_get_error(iscsi));
+ }
if (task != NULL) {
scsi_free_scsi_task(task);
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/10] Block patches for 2.0, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 02/10] qcow2: Flush metadata during read-only reopen, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 01/10] iscsi: Don't set error if already set in iscsi_do_inquiry,
Kevin Wolf <=
- [Qemu-devel] [PULL 03/10] qcow2: Put cache reference in error case, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 04/10] block: Don't parse 'filename' option, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 06/10] block: Fix snapshot=on for protocol parsed from filename, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 05/10] qemu-iotests: Remove CR line endings in reference output, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 08/10] dma-helpers: Initialize DMAAIOCB in_cancel flag, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 07/10] block: Check bdrv_getlength() return value in bdrv_append_temp_snapshot(), Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 09/10] iothread: make IOThread struct definition public, Kevin Wolf, 2014/04/04
- [Qemu-devel] [PULL 10/10] dataplane: replace iothread object_add() with embedded instance, Kevin Wolf, 2014/04/04
- Re: [Qemu-devel] [PULL 00/10] Block patches for 2.0, Peter Maydell, 2014/04/05