[libvirt] [PATCH] util: Fix virStorageBackendIQNFound() to work on FreeBSD

John Ferlan jferlan at redhat.com
Wed Jul 25 11:57:26 UTC 2018



On 07/25/2018 07:17 AM, Michal Privoznik wrote:
> On 07/25/2018 11:30 AM, Andrea Bolognani wrote:
>> Despite being standardized in POSIX.1-2008, the 'm'
>> sscanf() modifier is currently not available on FreeBSD.
>>
>> Reimplement parsing without sscanf() to work around the
>> issue.
>>
>> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
>> ---
>>  src/util/viriscsi.c | 34 ++++++++++++++++++++++++++++------
>>  1 file changed, 28 insertions(+), 6 deletions(-)
> 
> Le sigh. So apparently we can't take 10 years old standard for granted
> and have to use this ugly (as in not obvious) style of parsing. One
> possibility is to go to BSD guys and ask them to comply with POSIX, but
> that is very likely to fail. So as much as I hate to write this,
> 
> ACK
> 
> Michal

Should have gone with the overly intrusive virStringSplit[Count] option
like I suggested during review ;-) [which is at least partially open
coded here, but I digress].

John




More information about the libvir-list mailing list