libmultipath: parse_vpd_pg80: fix whitespace handling
authorMartin Wilck <mwilck@suse.com>
Mon, 24 Jun 2019 09:27:50 +0000 (11:27 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 3 Jul 2019 06:32:01 +0000 (08:32 +0200)
commite9f332625b4b91787efe15e5d16c4eb66fcaefb1
tree7501c0dd0f6c774a6022cc2ad57ddf251dce1452
parentcfb192da0632f8a8559caf5836e3b8f5d0c2f1d0
libmultipath: parse_vpd_pg80: fix whitespace handling

According to the SPC spec, the unit serial number is right-aligned
ASCII. Thus leading whitespace must be skipped. Moreover, trailing
whitespace should be discarded before doing the length check.

Fixes: 756ef73b7197 "Separate out vpd parsing functions"
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/discovery.c