multipath: fix scsi timeout code
authorBenjamin Marzinski <bmarzins@redhat.com>
Mon, 19 Dec 2011 22:19:56 +0000 (16:19 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 23 Dec 2011 20:03:15 +0000 (21:03 +0100)
commitbb817e4b8c2eef12fb831a17cf935db8a1677d06
tree32cd479b9ef6bce416173cd3636a8af84921d63a
parentbc43d66e29982de4b039e26aed4a700b95485dfb
multipath: fix scsi timeout code

sysfs_attr_set_value() returns the amount written on on success, or -1 on
failure.  sysfs_setc_scsi_tmo() was checking if the return was nonzero, and
failing if it was. This meant that it always failed out silently after writing
the first value. I've changed the check, and added some error messages.  I also
made sysfs_attr_set_value return -1 for all errors.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/discovery.c
libmultipath/sysfs.c