Changeset 5036 for lm-sensors/trunk/lib/sysfs.c
- Timestamp:
- 11/24/07 11:46:02 (3 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/lib/sysfs.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/sysfs.c
r4635 r5036 21 21 #define _GNU_SOURCE 22 22 23 #include <sys/types.h> 24 #include <sys/stat.h> 25 #include <unistd.h> 23 26 #include <string.h> 24 27 #include <stdlib.h> … … 39 42 int sensors_init_sysfs(void) 40 43 { 41 if (sysfs_get_mnt_path(sensors_sysfs_mount, NAME_MAX) == 0) 44 struct stat statbuf; 45 46 /* libsysfs will return success even if sysfs is not mounted, 47 so we have to double-check */ 48 if (sysfs_get_mnt_path(sensors_sysfs_mount, NAME_MAX) == 0 49 && stat(sensors_sysfs_mount, &statbuf) == 0 50 && statbuf.st_nlink > 2) 42 51 sensors_found_sysfs = 1; 43 52
