diff mbox

[for-2.4,07/10] block/iscsi: bump libiscsi requirement to 1.10.0

Message ID 1429186730-3866-8-git-send-email-pl@kamp.de
State New
Headers show

Commit Message

Peter Lieven April 16, 2015, 12:18 p.m. UTC
We need this to support SCSI_STATUS_TASK_SET_FULL.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Paolo Bonzini April 16, 2015, 12:33 p.m. UTC | #1
On 16/04/2015 14:18, Peter Lieven wrote:
> We need this to support SCSI_STATUS_TASK_SET_FULL.

Any reason apart from the missing constant?

Paolo

> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  configure | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 6969f6f..f73b8d0 100755
> --- a/configure
> +++ b/configure
> @@ -3630,15 +3630,15 @@ if compile_prog "" "" ; then
>  fi
>  
>  ##########################################
> -# Do we have libiscsi >= 1.9.0
> +# Do we have libiscsi >= 1.10.0
>  if test "$libiscsi" != "no" ; then
> -  if $pkg_config --atleast-version=1.9.0 libiscsi; then
> +  if $pkg_config --atleast-version=1.10.0 libiscsi; then
>      libiscsi="yes"
>      libiscsi_cflags=$($pkg_config --cflags libiscsi)
>      libiscsi_libs=$($pkg_config --libs libiscsi)
>    else
>      if test "$libiscsi" = "yes" ; then
> -      feature_not_found "libiscsi" "Install libiscsi >= 1.9.0"
> +      feature_not_found "libiscsi" "Install libiscsi >= 1.10.0"
>      fi
>      libiscsi="no"
>    fi
>
Peter Lieven April 16, 2015, 12:58 p.m. UTC | #2
Am 16.04.2015 um 14:33 schrieb Paolo Bonzini:
>
> On 16/04/2015 14:18, Peter Lieven wrote:
>> We need this to support SCSI_STATUS_TASK_SET_FULL.
> Any reason apart from the missing constant?

No, but I wanted to avoid starting checking for constants that were added shortly after this.
You can't check with #ifdef for a constant in an enum.
Libiscsi 1.10 was released in September 2013.

Peter


>
> Paolo
>
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>>   configure | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 6969f6f..f73b8d0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3630,15 +3630,15 @@ if compile_prog "" "" ; then
>>   fi
>>   
>>   ##########################################
>> -# Do we have libiscsi >= 1.9.0
>> +# Do we have libiscsi >= 1.10.0
>>   if test "$libiscsi" != "no" ; then
>> -  if $pkg_config --atleast-version=1.9.0 libiscsi; then
>> +  if $pkg_config --atleast-version=1.10.0 libiscsi; then
>>       libiscsi="yes"
>>       libiscsi_cflags=$($pkg_config --cflags libiscsi)
>>       libiscsi_libs=$($pkg_config --libs libiscsi)
>>     else
>>       if test "$libiscsi" = "yes" ; then
>> -      feature_not_found "libiscsi" "Install libiscsi >= 1.9.0"
>> +      feature_not_found "libiscsi" "Install libiscsi >= 1.10.0"
>>       fi
>>       libiscsi="no"
>>     fi
>>
Paolo Bonzini April 16, 2015, 1:20 p.m. UTC | #3
On 16/04/2015 14:58, Peter Lieven wrote:
>>
>> On 16/04/2015 14:18, Peter Lieven wrote:
>>> We need this to support SCSI_STATUS_TASK_SET_FULL.
>> Any reason apart from the missing constant?
> 
> No, but I wanted to avoid starting checking for constants that were
> added shortly after this.
> You can't check with #ifdef for a constant in an enum.

But you can #define it if libiscsi version is <1.10.

> Libiscsi 1.10 was released in September 2013.

But RHEL7 only has libiscsi 1.9 for example (it froze in August 2013),
and it won't upgrade ever due to ABI breakage in libiscsi.

Paolo
Peter Lieven April 17, 2015, 7:16 a.m. UTC | #4
Am 16.04.2015 um 15:20 schrieb Paolo Bonzini:
>
> On 16/04/2015 14:58, Peter Lieven wrote:
>>> On 16/04/2015 14:18, Peter Lieven wrote:
>>>> We need this to support SCSI_STATUS_TASK_SET_FULL.
>>> Any reason apart from the missing constant?
>> No, but I wanted to avoid starting checking for constants that were
>> added shortly after this.
>> You can't check with #ifdef for a constant in an enum.
> But you can #define it if libiscsi version is <1.10.

There is no macro to check for that. I took the easy way
hardcoding the value. Its an official standard so there is
no chance it will change.

Peter
diff mbox

Patch

diff --git a/configure b/configure
index 6969f6f..f73b8d0 100755
--- a/configure
+++ b/configure
@@ -3630,15 +3630,15 @@  if compile_prog "" "" ; then
 fi
 
 ##########################################
-# Do we have libiscsi >= 1.9.0
+# Do we have libiscsi >= 1.10.0
 if test "$libiscsi" != "no" ; then
-  if $pkg_config --atleast-version=1.9.0 libiscsi; then
+  if $pkg_config --atleast-version=1.10.0 libiscsi; then
     libiscsi="yes"
     libiscsi_cflags=$($pkg_config --cflags libiscsi)
     libiscsi_libs=$($pkg_config --libs libiscsi)
   else
     if test "$libiscsi" = "yes" ; then
-      feature_not_found "libiscsi" "Install libiscsi >= 1.9.0"
+      feature_not_found "libiscsi" "Install libiscsi >= 1.10.0"
     fi
     libiscsi="no"
   fi