From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6x2m-000727-U1 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 03:57:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6x2i-0001RC-Ri for qemu-devel@nongnu.org; Thu, 10 Dec 2015 03:57:44 -0500 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:49323 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6x2i-0001PV-Ik for qemu-devel@nongnu.org; Thu, 10 Dec 2015 03:57:40 -0500 References: <1449716386-5652-1-git-send-email-lszhu@suse.com> <56693E0C.8000003@redhat.com> From: Peter Lieven Message-ID: <56693E7C.2080206@kamp.de> Date: Thu, 10 Dec 2015 09:57:32 +0100 MIME-Version: 1.0 In-Reply-To: <56693E0C.8000003@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] fix:readcapacity 10 failure shown even 16 sent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Zhu Lingshan , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: ronniesahlberg@gmail.com Am 10.12.2015 um 09:55 schrieb Paolo Bonzini: > > On 10/12/2015 03:59, Zhu Lingshan wrote: >> - if (task == NULL || task->status != SCSI_STATUS_GOOD) { >> + if ((rc16 != NULL) && ((task == NULL) || (task->status != SCSI_STATUS_GOOD))) { >> + error_setg(errp, "iSCSI: failed to send readcapacity16 command."); >> + } > You need an "else" here. rc16 can't be not NULL if task is NULL. I would not spent to much energie here and just adjust the error message to "iSCSI: failed to send readcapacity10/16 command." Peter