hardinfo

Check-in [8b8b4188f2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:ARM fixes.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8b8b4188f274805cd1278d75c9658f9ce4570fcd
User & Date: jamesbond 2015-04-07 13:51:18
Context
2015-04-19
08:40
ARM CPU: detect name from either "Processor" or "model name" check-in: 7bbad8a228 user: jamesbond tags: trunk
2015-04-07
13:51
ARM fixes. check-in: 8b8b4188f2 user: jamesbond tags: trunk
2015-02-21
03:02
correct temperature interpretation in sysfs thermal zone. check-in: 0940fdba89 user: jamesbond tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/devices.c.

177
178
179
180
181
182
183
184

185
186

187
188
189
190
191
192
193
    scan_memory(FALSE);
    return moreinfo_lookup ("DEV:Total Memory"); //hi_more_info(N_("Total Memory"));
}

gchar *get_motherboard(void)
{
    char *board_name, *board_vendor;


    scan_dmi(FALSE);


    board_name = moreinfo_lookup("DEV:DMI:Board:Name");
    board_vendor = moreinfo_lookup("DEV:DMI:Board:Vendor");
    
    if (board_name && board_vendor && *board_name && *board_vendor)
       return g_strconcat(board_vendor, " ", board_name, NULL);
    else if (board_name && *board_name)
       return g_strconcat(board_name, _(" (vendor unknown)"), NULL);







<
>

<
>







177
178
179
180
181
182
183

184
185

186
187
188
189
190
191
192
193
    scan_memory(FALSE);
    return moreinfo_lookup ("DEV:Total Memory"); //hi_more_info(N_("Total Memory"));
}

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");
    
    if (board_name && board_vendor && *board_name && *board_vendor)
       return g_strconcat(board_vendor, " ", board_name, NULL);
    else if (board_name && *board_name)
       return g_strconcat(board_name, _(" (vendor unknown)"), NULL);

Changes to modules/devices/arm/processor.c.

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    while (fgets(buffer, 128, cpuinfo)) {
	gchar **tmp = g_strsplit(buffer, ":", 2);

	if (tmp[0] && tmp[1]) {
	    tmp[0] = g_strstrip(tmp[0]);
	    tmp[1] = g_strstrip(tmp[1]);

	    get_str("Processor", processor->model_name);
	    get_str("Features", processor->flags);
	    get_float("BogoMIPS", processor->bogomips);

	    get_str("Hardware", processor->has_fpu);
	}
	g_strfreev(tmp);
    }
................................................................................
        
	return g_strdup_printf("[Processor]\n"
	                       "Name=%s\n"
	                       "Features=%s\n"
			       "BogoMips=%.2f\n"
			       "Endianesss="
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
                               "Little Endian",
#else
                               "Big Endian",
#endif
                               "\n"
			       "Hardware=%s\n",
			       processor->model_name,
			       processor->flags,
			       processor->bogomips,
			       processor->has_fpu);
}







|







 







|

|








34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    while (fgets(buffer, 128, cpuinfo)) {
	gchar **tmp = g_strsplit(buffer, ":", 2);

	if (tmp[0] && tmp[1]) {
	    tmp[0] = g_strstrip(tmp[0]);
	    tmp[1] = g_strstrip(tmp[1]);

	    get_str("model name", processor->model_name);
	    get_str("Features", processor->flags);
	    get_float("BogoMIPS", processor->bogomips);

	    get_str("Hardware", processor->has_fpu);
	}
	g_strfreev(tmp);
    }
................................................................................
        
	return g_strdup_printf("[Processor]\n"
	                       "Name=%s\n"
	                       "Features=%s\n"
			       "BogoMips=%.2f\n"
			       "Endianesss="
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
                               "Little Endian"
#else
                               "Big Endian"
#endif
                               "\n"
			       "Hardware=%s\n",
			       processor->model_name,
			       processor->flags,
			       processor->bogomips,
			       processor->has_fpu);
}

Changes to modules/devices/usb.c.

281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
        } else if (g_str_has_prefix(buffer, "Bus ")) {
            /* device separator */
            fseek(lsusb, position, SEEK_SET);
            break;
        }
    }

    if (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");
        }
    }

    tmp = g_strdup_printf("USB%d", usb_device_number);
    usb_list = h_strdup_cprintf("$%s$%s=\n", usb_list, tmp, name);

    strhash = g_strdup_printf("[Device Information]\n"
			      "Product=%s\n"
			      "Manufacturer=%s\n"







|






|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
        } else if (g_str_has_prefix(buffer, "Bus ")) {
            /* device separator */
            fseek(lsusb, position, SEEK_SET);
            break;
        }
    }

    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);

    strhash = g_strdup_printf("[Device Information]\n"
			      "Product=%s\n"
			      "Manufacturer=%s\n"

Changes to shell/shell.c.

1531
1532
1533
1534
1535
1536
1537


1538
1539
1540
1541
1542
1543
1544

static gchar *shell_summary_clear_value(gchar *value)
{
     GKeyFile *keyfile;
     gchar *return_value;
     
     keyfile = g_key_file_new();


     if (g_key_file_load_from_data(keyfile, value,
                                   strlen(value), 0, NULL)) {
          gchar **groups;
          gint group;
          
          return_value = g_strdup("");
          







>
>







1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546

static gchar *shell_summary_clear_value(gchar *value)
{
     GKeyFile *keyfile;
     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;
          gint group;
          
          return_value = g_strdup("");