mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-26 20:38:20 +00:00
Drop support for reloading the configuration with sensors_init().
Instead, the application will have to call sensors_exit() explicitly before calling sensors_init() again. Most applications don't offer any way to reload the configuration file, so better optimize for the initial load. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4693 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
fe165fea49
commit
12655c1d85
4 files changed
+13
-6
No files matched your search
+3
-1
@@ -90,8 +90,10 @@ loadConfig
|
||||
sensorLog (LOG_ERR, "Error stating sensors configuration file: %s", cfgPath);
|
||||
ret = 10;
|
||||
} else if (!reload || (difftime (stats.st_mtime, cfgLastModified) > 0.0)) {
|
||||
if (reload)
|
||||
if (reload) {
|
||||
sensorLog (LOG_INFO, "configuration reloading");
|
||||
sensors_cleanup ();
|
||||
}
|
||||
if (!(cfg = fopen (cfgPath, "r"))) {
|
||||
sensorLog (LOG_ERR, "Error opening sensors configuration file: %s", cfgPath);
|
||||
ret = 11;
|
||||
|
||||
Reference in new issue
Block a user