diff options
author | jamesbond <jamesbond> | 2015-04-07 13:51:18 +0000 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2015-10-25 15:49:33 -0200 |
commit | 35a55bda891bf7a959cbb0ed7e1247475ad14c32 (patch) | |
tree | 2390a767e965d906460a724d3e5d155090db7455 | |
parent | c0a85b60c4aaa4a20efc05b992e747c0cda8d7a3 (diff) |
ARM fixes.
-rw-r--r-- | modules/devices.c | 4 | ||||
-rw-r--r-- | modules/devices/arm/processor.c | 6 | ||||
-rw-r--r-- | modules/devices/usb.c | 4 | ||||
-rw-r--r-- | shell/shell.c | 2 |
4 files changed, 9 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); diff --git a/shell/shell.c b/shell/shell.c index 551f4a7d..12bd2002 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -1537,6 +1537,8 @@ static gchar *shell_summary_clear_value(gchar *value) gchar *return_value; keyfile = g_key_file_new(); + if (!value) return_value = g_strdup(""); + else if (g_key_file_load_from_data(keyfile, value, strlen(value), 0, NULL)) { gchar **groups; |