]> xenbits.xensource.com Git - libvirt.git/commit
virStorageBackendIQNFound: Rework iscsiadm output parsing
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 29 Jun 2018 09:34:23 +0000 (11:34 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Jul 2018 05:11:13 +0000 (07:11 +0200)
commitf28099ddd791652add358de91a77b416c6d4a3d2
tree623c49b6b3085db7ba9ad88d052dfd7a55b73450
parentadeadc53a725fe0da34a502f32e41f80837ce6dc
virStorageBackendIQNFound: Rework iscsiadm output parsing

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 <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/viriscsi.c