This patch adds the files lib/sysfs.h and lib/sysfs.c, beginning with a rewrite
of the sysfs detection code (using libsyfs).  In the process, I replaced two
poorly named globals with better names, and moved them to sysfs.c.  The sysfs
detection now happens very early during library init, rather than later.

The long term plan is for the two global variables to disappear anyway, as
everything to do with sysfs should get moved into lib/sysfs.c.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3093 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark M. Hoffman committed 2005-09-18 20:30:44 +00:00
1 parent 10337cf80b
commit 87fba1c487
7 files changed
+85 -35

No files matched your search

+2 -1
View File
@@ -26,6 +26,7 @@
#include "error.h"
#include "proc.h"
#include "general.h"
#include "sysfs.h"
static int sensors_do_this_chip_sets(sensors_chip_name name);
@@ -120,7 +121,7 @@ const sensors_chip_feature *sensors_lookup_feature_name(const char *prefix,
if there are wildcards. */
int sensors_chip_name_has_wildcards(sensors_chip_name chip)
{
if(foundsysfs) {
if (sensors_found_sysfs) {
if (chip.prefix == SENSORS_CHIP_NAME_PREFIX_ANY)
return 1;
else