aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorjamesbond <jamesbond>2015-04-07 13:51:18 +0000
committerLeandro Pereira <leandro@hardinfo.org>2015-10-25 15:49:33 -0200
commit35a55bda891bf7a959cbb0ed7e1247475ad14c32 (patch)
tree2390a767e965d906460a724d3e5d155090db7455 /modules
parentc0a85b60c4aaa4a20efc05b992e747c0cda8d7a3 (diff)
ARM fixes.
Diffstat (limited to 'modules')
-rw-r--r--modules/devices.c4
-rw-r--r--modules/devices/arm/processor.c6
-rw-r--r--modules/devices/usb.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/modules/devices.c b/modules/devices.c
index 60eed920..82484a23 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -181,9 +181,9 @@ gchar *get_memory_total(void)
gchar *get_motherboard(void)
{
char *board_name, *board_vendor;
-
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
scan_dmi(FALSE);
-
+#endif
board_name = moreinfo_lookup("DEV:DMI:Board:Name");
board_vendor = moreinfo_lookup("DEV:DMI:Board:Vendor");
diff --git a/modules/devices/arm/processor.c b/modules/devices/arm/processor.c
index c37aadca..b5c33ce6 100644
--- a/modules/devices/arm/processor.c
+++ b/modules/devices/arm/processor.c
@@ -38,7 +38,7 @@ processor_scan(void)
tmp[0] = g_strstrip(tmp[0]);
tmp[1] = g_strstrip(tmp[1]);
- get_str("Processor", processor->model_name);
+ get_str("model name", processor->model_name);
get_str("Features", processor->flags);
get_float("BogoMIPS", processor->bogomips);
@@ -65,9 +65,9 @@ processor_get_info(GSList *processors)
"BogoMips=%.2f\n"
"Endianesss="
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- "Little Endian",
+ "Little Endian"
#else
- "Big Endian",
+ "Big Endian"
#endif
"\n"
"Hardware=%s\n",
diff --git a/modules/devices/usb.c b/modules/devices/usb.c
index a52954a6..96325b23 100644
--- a/modules/devices/usb.c
+++ b/modules/devices/usb.c
@@ -285,14 +285,14 @@ void __scan_usb_lsusb_add_device(char *buffer, int bufsize, FILE *lsusb, int usb
}
}
- if (strstr(dev_class, "0 (Defined at Interface level)")) {
+ if (dev_class && strstr(dev_class, "0 (Defined at Interface level)")) {
g_free(dev_class);
if (int_class) {
dev_class = int_class;
} else {
dev_class = g_strdup("Unknown");
}
- }
+ } else dev_class = g_strdup("Unknown");
tmp = g_strdup_printf("USB%d", usb_device_number);
usb_list = h_strdup_cprintf("$%s$%s=\n", usb_list, tmp, name);