mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-28 20:58:22 +00:00
Report configuration file read errors.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5638 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
556b03e425
commit
ea0cfbeadf
3 files changed
+8
-1
No files matched your search
@@ -9,6 +9,7 @@ SVN-HEAD
|
|||||||
Return a string rather than NULL for unknown errors
|
Return a string rather than NULL for unknown errors
|
||||||
Skip non-file sysfs entries for speed
|
Skip non-file sysfs entries for speed
|
||||||
Fix memory leak in scanner when using flex 2.5.9 or later
|
Fix memory leak in scanner when using flex 2.5.9 or later
|
||||||
|
Report configuration file read errors
|
||||||
lm_sensors.init: Support new format of /etc/sysconfig/lm_sensors (#2246)
|
lm_sensors.init: Support new format of /etc/sysconfig/lm_sensors (#2246)
|
||||||
Drop support for kernels 2.4 and earlier
|
Drop support for kernels 2.4 and earlier
|
||||||
lm_sensors.init.suse: Delete (actual SuSE script is much different)
|
lm_sensors.init.suse: Delete (actual SuSE script is much different)
|
||||||
|
|||||||
+4
-1
@@ -58,7 +58,10 @@ const char *sensors_strerror(int errnum)
|
|||||||
|
|
||||||
void sensors_default_parse_error(const char *err, int lineno)
|
void sensors_default_parse_error(const char *err, int lineno)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error: Line %d: %s\n", lineno, err);
|
if (lineno)
|
||||||
|
fprintf(stderr, "Error: Line %d: %s\n", lineno, err);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "Error: %s\n", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sensors_default_fatal_error(const char *proc, const char *err)
|
void sensors_default_fatal_error(const char *proc, const char *err)
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ int sensors_init(FILE *input)
|
|||||||
goto exit_cleanup;
|
goto exit_cleanup;
|
||||||
}
|
}
|
||||||
fclose(input);
|
fclose(input);
|
||||||
|
} else if (errno != ENOENT) {
|
||||||
|
sensors_parse_error(strerror(errno), 0);
|
||||||
|
goto exit_cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user