aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hardinfo2/arch/common/languages.h2
-rw-r--r--hardinfo2/arch/linux/common/modules.h2
-rw-r--r--hardinfo2/arch/linux/common/sensors.h16
3 files changed, 14 insertions, 6 deletions
diff --git a/hardinfo2/arch/common/languages.h b/hardinfo2/arch/common/languages.h
index efc100fb..8c4d5b29 100644
--- a/hardinfo2/arch/common/languages.h
+++ b/hardinfo2/arch/common/languages.h
@@ -77,7 +77,7 @@ scan_languages(OperatingSystem * os)
"Revision=%s\n"
"Date=%s\n"
"Codeset=%s\n",
- FIELD(name), FIELD(title),
+ name, FIELD(title),
FIELD(source), FIELD(address),
FIELD(email), FIELD(language),
FIELD(territory), FIELD(revision),
diff --git a/hardinfo2/arch/linux/common/modules.h b/hardinfo2/arch/linux/common/modules.h
index 6fbe13bd..4ae3a960 100644
--- a/hardinfo2/arch/linux/common/modules.h
+++ b/hardinfo2/arch/linux/common/modules.h
@@ -119,7 +119,7 @@ scan_modules_do(void)
"License=%s\n",
NONE_IF_NULL(filename),
memory / 1024.0,
- NONE_IF_NULL(modname),
+ modname,
NONE_IF_NULL(description),
NONE_IF_NULL(vermagic),
NONE_IF_NULL(author),
diff --git a/hardinfo2/arch/linux/common/sensors.h b/hardinfo2/arch/linux/common/sensors.h
index 1c4fd69f..317d2ebb 100644
--- a/hardinfo2/arch/linux/common/sensors.h
+++ b/hardinfo2/arch/linux/common/sensors.h
@@ -31,9 +31,17 @@ static void read_sensor_labels(gchar * driver)
g_free, g_free);
sensor_compute = g_hash_table_new(g_str_hash, g_str_equal);
- conf = fopen("/etc/sensors.conf", "r");
- if (!conf)
- return;
+ /* Try to open lm-sensors config file sensors3.conf */
+ conf = fopen("/etc/sensors3.conf", "r");
+
+ /* If it fails, try to open sensors.conf */
+ if (!conf) conf = fopen("/etc/sensors.conf", "r");
+
+ if (!conf) {
+ /* Cannot open config file. */
+ fprintf(stderr, "Cannot open /etc/sensors.conf file.\n");
+ return;
+ }
while (fgets(buf, 256, conf)) {
line = buf;
@@ -100,7 +108,7 @@ static void read_sensor_labels(gchar * driver)
for (i = 1; chips[i]; i++) {
strend(chips[i], '*');
- if (g_str_has_prefix(driver, chips[i] + 1)) {
+ if (g_str_has_prefix(chips[i] + 1, driver)) {
lock = TRUE;
break;
}