From 16408d86652edac4b7c013d523490c2edcc6ccdc Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 9 Apr 2007 18:07:07 +0000 Subject: [PATCH] -comment abituguru entry in lib/chips.c and prog/sensors/main.c, as the abituguru seems to work well with the new dynamic chip support and generic chip printroutines. note: the abituguru code should be completly removed in the future. -comment k8temp entry in lib/chips.c and prog/sensors/main.c, as the k8temp seems to work well with the new dynamic chip support and generic chip printroutines. note: the k8temp code should be completly removed in the future. -make the match for the subtype exact instead of a strncmp, otherwise an alarm_enable flag gets classified as an alarm, leading to all sensors who have their alarm enabled getting an alarm reported, as the alarm_enabled gets read as alarm. -and do the same for the _input match to check if this is a main or subfeature git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4367 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/access.c | 2 +- lib/chips.c | 4 ++-- lib/sysfs.c | 3 +-- prog/sensors/main.c | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/access.c b/lib/access.c index d92b4db3..ce951e39 100644 --- a/lib/access.c +++ b/lib/access.c @@ -598,7 +598,7 @@ sensors_feature_type sensors_feature_get_type( submatches = matches[i].submatches; for(i = 0; submatches[i].name != 0; i++) - if (!strncmp(name + pmatch[3].rm_so, submatches[i].name, size_second)) + if (!strcmp(name + pmatch[3].rm_so, submatches[i].name)) return submatches[i].type; return SENSORS_FEATURE_UNKNOWN; diff --git a/lib/chips.c b/lib/chips.c index 8d4e5090..b9f6f214 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -6159,8 +6159,8 @@ sensors_chip_features sensors_chip_features_list[] = { SENSORS_SMSC47B397_PREFIX, smsc47b397_features }, { SENSORS_F71805F_PREFIX, f71805f_features }, { SENSORS_F71872F_PREFIX, f71805f_features }, - { SENSORS_ABITUGURU_PREFIX, abituguru_features }, - { SENSORS_K8TEMP_PREFIX, k8temp_features }, +// { SENSORS_ABITUGURU_PREFIX, abituguru_features }, +// { SENSORS_K8TEMP_PREFIX, k8temp_features }, { SENSORS_CORETEMP_PREFIX, coretemp_features }, { SENSORS_DME1737_PREFIX, dme1737_features }, PLACEHOLDER_ELEMENTS, diff --git a/lib/sysfs.c b/lib/sysfs.c index dadcb203..52880b44 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -96,8 +96,7 @@ sensors_chip_features sensors_read_dynamic_chip(struct sysfs_device *sysdir) feature.data.compute_mapping = SENSORS_NO_MAPPING; if (pmatch[2].rm_so != -1) { - if (!strncmp(name + pmatch[2].rm_so, "_input", - pmatch[2].rm_eo - pmatch[2].rm_so)) { + if (!strcmp(name + pmatch[2].rm_so, "_input")) { int last_match; /* copy only the part before the _ */ diff --git a/prog/sensors/main.c b/prog/sensors/main.c index ca0f2f82..df18e8aa 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -425,8 +425,8 @@ struct match matches[] = { { "smsc47b397", print_smsc47b397 }, { "f71805f", print_f71805f }, { "f71872f", print_f71805f }, - { "abituguru", print_abituguru }, - { "k8temp", print_k8temp }, +// { "abituguru", print_abituguru }, +// { "k8temp", print_k8temp }, { "coretemp", print_coretemp }, { "dme1737", print_dme1737 }, { NULL, NULL }