2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 05:48:07 +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:
Jean Delvare 2007-10-25 09:52:46 +00:00
parent 58b3284058
commit de00b0aad4
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -49,14 +49,14 @@ int sensors_init(FILE *input)
} else {
/* No configuration provided, use default */
input = fopen(DEFAULT_CONFIG_FILE, "r");
if (!input)
goto exit_cleanup;
if (sensors_scanner_init(input) ||
sensors_yyparse()) {
if (input) {
if (sensors_scanner_init(input) ||
sensors_yyparse()) {
fclose(input);
goto exit_cleanup;
}
fclose(input);
goto exit_cleanup;
}
fclose(input);
}
if ((res = sensors_substitute_busses()))