aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2014-05-19 17:13:06 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-05-20 10:09:45 +0200
commitf2564d88fe7949bdb5ca4ad652282c28b3da6210 (patch)
tree4d48b6bc5a43ec18294a2aff957161207a8da1f0 /block
parent91e7fcca4743cf694eb0c8e7a8d938cf359b5bd8 (diff)
downloadqemu-f2564d88fe7949bdb5ca4ad652282c28b3da6210.zip
qemu-f2564d88fe7949bdb5ca4ad652282c28b3da6210.tar.gz
qemu-f2564d88fe7949bdb5ca4ad652282c28b3da6210.tar.bz2
block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
Commit b03c380 introduced the function iscsi_allocationmap_is_allocated(), however it is only used within a code block that is conditionally compiled. This produces a warning (error with -werror) of "defined but not used" for the the function, if LIBISCSI_FEATURE_IOVECTOR is not defined. This wraps iscsi_allocationmap_is_allocated() in the same conditional. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/iscsi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 65bf97d..1b4af77 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -381,6 +381,7 @@ retry:
}
+#if defined(LIBISCSI_FEATURE_IOVECTOR)
static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
int64_t sector_num, int nb_sectors)
{
@@ -393,9 +394,6 @@ static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
sector_num / iscsilun->cluster_sectors) == size);
}
-
-#if defined(LIBISCSI_FEATURE_IOVECTOR)
-
static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
int64_t sector_num,
int nb_sectors, int *pnum)