mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 22:05:11 +00:00
Make the configuration file optional. Although in most cases it's not
very useful to use libsensors without a configuration file, I fail to see the rationale for making a configuration file mandatory. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4989 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -4,6 +4,7 @@ lm-sensors CHANGES file
|
||||
SVN HEAD
|
||||
libsensors: Add a default configuration file
|
||||
Fix memory leaks on initialization error
|
||||
Make the configuration file optional
|
||||
sensord: Reload config on SIGHUP rather than automatically
|
||||
No default configuration file name
|
||||
sensors: Fix file handle leak on library initialization error
|
||||
|
@@ -49,8 +49,7 @@ int sensors_init(FILE *input)
|
||||
} else {
|
||||
/* No configuration provided, use default */
|
||||
input = fopen(DEFAULT_CONFIG_FILE, "r");
|
||||
if (!input)
|
||||
goto exit_cleanup;
|
||||
if (input) {
|
||||
if (sensors_scanner_init(input) ||
|
||||
sensors_yyparse()) {
|
||||
fclose(input);
|
||||
@@ -58,6 +57,7 @@ int sensors_init(FILE *input)
|
||||
}
|
||||
fclose(input);
|
||||
}
|
||||
}
|
||||
|
||||
if ((res = sensors_substitute_busses()))
|
||||
goto exit_cleanup;
|
||||
|
Reference in New Issue
Block a user