From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTv6Q-00086I-H6 for qemu-devel@nongnu.org; Wed, 09 Oct 2013 10:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTv6I-00052f-Ro for qemu-devel@nongnu.org; Wed, 09 Oct 2013 10:51:06 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:49012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTv6I-00052P-JV for qemu-devel@nongnu.org; Wed, 09 Oct 2013 10:50:58 -0400 Received: by mail-ea0-f176.google.com with SMTP id q16so461352ead.7 for ; Wed, 09 Oct 2013 07:50:57 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 9 Oct 2013 16:50:49 +0200 Message-Id: <1381330250-1458-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1381330250-1458-1-git-send-email-pbonzini@redhat.com> References: <1381330250-1458-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 1/2] block/iscsi: reenable iscsi_co_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Lieven From: Peter Lieven Commit f35c934a accidently disabled iscsi_co_get_block_status for all libiscsi versions. Its not possible to check for enumeration constants in the C preprocessor. This patch changes the check to the preprocessor constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly after get_lba_status support was added to libiscsi. Signed-off-by: Peter Lieven Signed-off-by: Paolo Bonzini --- block/iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6152ef1..a2a961e 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -811,7 +811,7 @@ iscsi_getlength(BlockDriverState *bs) return len; } -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED) +#if defined(LIBISCSI_FEATURE_IOVECTOR) static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs, int64_t sector_num, @@ -903,7 +903,7 @@ out: return ret; } -#endif /* SCSI_PROVISIONING_TYPE_DEALLOCATED */ +#endif /* LIBISCSI_FEATURE_IOVECTOR */ static int coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t sector_num, @@ -1529,7 +1529,7 @@ static BlockDriver bdrv_iscsi = { .bdrv_getlength = iscsi_getlength, .bdrv_truncate = iscsi_truncate, -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED) +#if defined(LIBISCSI_FEATURE_IOVECTOR) .bdrv_co_get_block_status = iscsi_co_get_block_status, #endif .bdrv_co_discard = iscsi_co_discard, -- 1.8.3.1