diff --git a/lib/sysfs.c b/lib/sysfs.c index 8e46ddce..4450b00e 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -755,7 +755,7 @@ int sensors_init_sysfs(void) snprintf(hwmon_path, length, "%s%s", sensors_sysfs_mount, hwmon_subdir); result = !stat(hwmon_path, &statbuf) && ((statbuf.st_mode & S_IFMT) == S_IFDIR); - if (!result) + if (sysfs_root_env && !result) fprintf(stderr, "%s: No sensors at %s.\n", sensors_sysfs_mount, hwmon_path); free(hwmon_path);