Permalink
Browse files

iscsi tools: fix null sysfs string handling

If a string is null we used to get <NULL>. We now get
(null). This patch checks for both to support new and
old kernels.
  • Loading branch information...
1 parent a01fcc4 commit f0b670c016c85c882bb0583eaef8ea2f7147d4af Mike Christie committed Mar 24, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 usr/sysfs.c
View
@@ -566,7 +566,8 @@ char *sysfs_get_value(char *id, char *subsys, char *param)
return NULL;
}
- if (!strncmp(sysfs_value, "<NULL>", 6))
+ if (!strncmp(sysfs_value, "<NULL>", 6) ||
+ !strncmp(sysfs_value, "(null)", 6))
return NULL;
return sysfs_value;

0 comments on commit f0b670c

Please sign in to comment.