Re: [libvirt] [PATCH v2 03/10] virStorageBackendIQNFound: Rework iscsiadm output parsing

2018-07-23 Thread Michal Prívozník
On 07/17/2018 08:42 PM, John Ferlan wrote: > > > On 07/04/2018 05:23 AM, Michal Privoznik wrote: >> Firstly, we can utilize virCommandSetOutputBuffer() API which >> will collect the command output for us. Secondly, sscanf()-ing >> through each line is easier to understand (and more robust) than >

Re: [libvirt] [PATCH v2 03/10] virStorageBackendIQNFound: Rework iscsiadm output parsing

2018-07-17 Thread John Ferlan
On 07/04/2018 05:23 AM, Michal Privoznik wrote: > Firstly, we can utilize virCommandSetOutputBuffer() API which > will collect the command output for us. Secondly, sscanf()-ing > through each line is easier to understand (and more robust) than > jumping over a string with strchr(). > > Signed-o

[libvirt] [PATCH v2 03/10] virStorageBackendIQNFound: Rework iscsiadm output parsing

2018-07-04 Thread Michal Privoznik
Firstly, we can utilize virCommandSetOutputBuffer() API which will collect the command output for us. Secondly, sscanf()-ing through each line is easier to understand (and more robust) than jumping over a string with strchr(). Signed-off-by: Michal Privoznik --- src/util/viriscsi.c | 85