diff options
author | mananth <mananth> | 2005-11-25 14:10:44 +0000 |
---|---|---|
committer | mananth <mananth> | 2005-11-25 14:10:44 +0000 |
commit | fb45b782f9ad70eb1110a9613991e1b7c8890689 (patch) | |
tree | 5db29bea98f38437c179b815515b150cb1fe5cfa | |
parent | 38937e97df8400e3a0b50db8477e94c8d44954a1 (diff) | |
download | sysfsutils-fb45b782f9ad70eb1110a9613991e1b7c8890689.tar.gz |
Mohan's update to missing defn libsysfs.h
-rw-r--r-- | include/libsysfs.h | 2 | ||||
-rw-r--r-- | lib/sysfs_utils.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/libsysfs.h b/include/libsysfs.h index 2cb9eb9..5a460eb 100644 --- a/include/libsysfs.h +++ b/include/libsysfs.h @@ -221,6 +221,8 @@ extern struct sysfs_attribute *sysfs_get_module_parm (struct sysfs_module *module, const char *parm); extern struct sysfs_attribute *sysfs_get_module_section (struct sysfs_module *module, const char *section); +extern struct sysfs_attribute *sysfs_open_module_attr(const char *module, + const char *attrib); /** * sort_list: sorter function to keep list elements sorted in alphabetical diff --git a/lib/sysfs_utils.c b/lib/sysfs_utils.c index 983cb2d..6397342 100644 --- a/lib/sysfs_utils.c +++ b/lib/sysfs_utils.c @@ -54,6 +54,9 @@ int sysfs_get_mnt_path(char *mnt_path, size_t len) static char sysfs_path[SYSFS_PATH_MAX] = ""; const char *sysfs_path_env; + if (len == 0 || mnt_path == NULL) + return -1; + /* evaluate only at the first call */ if (sysfs_path[0] == '\0') { /* possible overrride of real mount path */ |