Patchwork libmultipath: fix return code of sysfs_get_timeout

login
register
mail settings
Submitter Martin Wilck
Date Nov. 20, 2017, 6:12 p.m.
Message ID <20171120181236.6697-1-mwilck@suse.com>
Download mbox | patch
Permalink /patch/10066869/
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Comments

Martin Wilck - Nov. 20, 2017, 6:12 p.m.
This function should return 1 on success, as the other sysfs_get_XXX
functions. The callers actually expect this - therefore timeout values
from sysfs are never used.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index cadf4617894f..3ae934261b65 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -276,7 +276,7 @@  sysfs_get_timeout(struct path *pp, unsigned int *timeout)
 	}
 	*timeout = t;
 
-	return 0;
+	return 1;
 }
 
 int