commit f0b670c016c85c882bb0583eaef8ea2f7147d4af Author: Mike Christie Date: Tue Mar 23 21:59:13 2010 -0500 iscsi tools: fix null sysfs string handling If a string is null we used to get . We now get (null). This patch checks for both to support new and old kernels. References: bnc #683249, #656119 --- usr/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: b/usr/sysfs.c =================================================================== --- a/usr/sysfs.c +++ b/usr/sysfs.c @@ -566,7 +566,8 @@ char *sysfs_get_value(char *id, char *su return NULL; } - if (!strncmp(sysfs_value, "", 6)) + if (!strncmp(sysfs_value, "", 6) || + !strncmp(sysfs_value, "(null)", 6)) return NULL; return sysfs_value;