hardinfo

Check-in [d61b38eb37]
Login

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

Overview
Comment:upstream: Split x86 and x86_64 arches
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d61b38eb37b50114b27e129ea2325b0da60106f3
User & Date: jamesbond 2014-06-06 18:44:03
Context
2014-06-06
18:44
upstream: Fix underlinking wrt https://bugs.gentoo.org/show_bug.cgi?id=418121 check-in: 93134ad3d2 user: jamesbond tags: trunk
18:44
upstream: Split x86 and x86_64 arches check-in: d61b38eb37 user: jamesbond tags: trunk
18:43
upstream: Use GNUInstallDirs and respect lib suffix check-in: 4f6525c26e user: jamesbond tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to CMakeLists.txt.

11
12
13
14
15
16
17
18
19


20
21
22
23
24
25
26

if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
	set(HARDINFO_OS "linux")
else()
	message(FATAL_ERROR "Unsupported operating system: ${CMAKE_HOST_SYSTEM_NAME}")
endif()

if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "i[3-6]86|x86_64")
	set(HARDINFO_ARCH "x86")


elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "ppc{32,64}")
	set(HARDINFO_ARCH "ppc")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "mips")
	set(HARDINFO_ARCH "mips")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "parisc.*")
	set(HARDINFO_ARCH "parisc")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "sparc{32,64}")







|

>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
	set(HARDINFO_OS "linux")
else()
	message(FATAL_ERROR "Unsupported operating system: ${CMAKE_HOST_SYSTEM_NAME}")
endif()

if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "i[3-6]86")
	set(HARDINFO_ARCH "x86")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64")
	set(HARDINFO_ARCH "x86_64")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "ppc{32,64}")
	set(HARDINFO_ARCH "ppc")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "mips")
	set(HARDINFO_ARCH "mips")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "parisc.*")
	set(HARDINFO_ARCH "parisc")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "sparc{32,64}")

Changes to includes/devices.h.

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
84
85
86
87
88
89
90
91
92
93
94
95
96
void scan_printers_do(void);

/* Sensors */
void scan_sensors_do(void);
void sensors_init(void);
void sensors_shutdown(void);

#ifdef ARCH_x86
/* SPD */
void scan_spd_do(void);
#endif /* ARCH_x86 */

extern gchar *battery_list;
extern gchar *input_icons;
extern gchar *input_list;
................................................................................
extern gchar *usb_list;
extern GHashTable *memlabels;
extern GHashTable *_pci_devices;
extern GHashTable *sensor_compute;
extern GHashTable *sensor_labels;
extern GModule *cups;

#ifdef ARCH_x86
extern gchar *dmi_info;
extern gchar *spd_info;
#endif

#endif /* __DEVICES_H__ */







|







 







|





60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
84
85
86
87
88
89
90
91
92
93
94
95
96
void scan_printers_do(void);

/* Sensors */
void scan_sensors_do(void);
void sensors_init(void);
void sensors_shutdown(void);

#if defined(ARCH_x86) || defined(ARCH_x86_64)
/* SPD */
void scan_spd_do(void);
#endif /* ARCH_x86 */

extern gchar *battery_list;
extern gchar *input_icons;
extern gchar *input_list;
................................................................................
extern gchar *usb_list;
extern GHashTable *memlabels;
extern GHashTable *_pci_devices;
extern GHashTable *sensor_compute;
extern GHashTable *sensor_labels;
extern GModule *cups;

#if defined(ARCH_x86) || defined(ARCH_x86_64)
extern gchar *dmi_info;
extern gchar *spd_info;
#endif

#endif /* __DEVICES_H__ */

Changes to modules/devices.c.

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
gchar *callback_battery();
gchar *callback_pci();
gchar *callback_sensors();
gchar *callback_printers();
gchar *callback_storage();
gchar *callback_input();
gchar *callback_usb();
#if defined(ARCH_x86)
gchar *callback_dmi();
gchar *callback_spd();
#endif
gchar *callback_device_resources();

void scan_processors(gboolean reload);
void scan_memory(gboolean reload);
................................................................................
void scan_battery(gboolean reload);
void scan_pci(gboolean reload);
void scan_sensors(gboolean reload);
void scan_printers(gboolean reload);
void scan_storage(gboolean reload);
void scan_input(gboolean reload);
void scan_usb(gboolean reload);
#if defined(ARCH_x86)
void scan_dmi(gboolean reload);
void scan_spd(gboolean reload);
#endif
void scan_device_resources(gboolean reload);

gchar *hi_more_info(gchar *entry);

................................................................................
    {"PCI Devices", "devices.png", callback_pci, scan_pci, MODULE_FLAG_NONE},
    {"USB Devices", "usb.png", callback_usb, scan_usb, MODULE_FLAG_NONE},
    {"Printers", "printer.png", callback_printers, scan_printers, MODULE_FLAG_NONE},
    {"Battery", "battery.png", callback_battery, scan_battery, MODULE_FLAG_NONE},
    {"Sensors", "therm.png", callback_sensors, scan_sensors, MODULE_FLAG_NONE},
    {"Input Devices", "inputdevices.png", callback_input, scan_input, MODULE_FLAG_NONE},
    {"Storage", "hdd.png", callback_storage, scan_storage, MODULE_FLAG_NONE},
#if defined(ARCH_x86)
    {"DMI", "computer.png", callback_dmi, scan_dmi, MODULE_FLAG_NONE},
    {"Memory SPD", "memory.png", callback_spd, scan_spd, MODULE_FLAG_NONE},
#endif	/* x86 or x86_64 */
    {"Resources", "resources.png", callback_device_resources, scan_device_resources, MODULE_FLAG_NONE},
    {NULL}
};

................................................................................

    if (info)
	return g_strdup(info);

    return g_strdup(field);
}

#if defined(ARCH_x86)
void scan_dmi(gboolean reload)
{
    SCAN_START();
    __scan_dmi();
    SCAN_END();
}

................................................................................
}

gchar *callback_processors()
{
    return processor_get_info(processors);
}

#if defined(ARCH_x86)
gchar *callback_dmi()
{
    return g_strdup(dmi_info);
}

gchar *callback_spd()
{
................................................................................
             .save_to = "pci.ids",
             .get_data = NULL
        };

        sync_manager_add_entry(&se);
    }

#if defined(ARCH_x86)
    {
      static SyncEntry se = {
        .fancy_name = "Update CPU feature database",
        .name = "RecvCPUFlags",
        .save_to = "cpuflags.conf",
        .get_data = NULL
      };







|







 







|







 







|







 







|







 







|







 







|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
gchar *callback_battery();
gchar *callback_pci();
gchar *callback_sensors();
gchar *callback_printers();
gchar *callback_storage();
gchar *callback_input();
gchar *callback_usb();
#if defined(ARCH_x86) || defined(ARCH_x86_64)
gchar *callback_dmi();
gchar *callback_spd();
#endif
gchar *callback_device_resources();

void scan_processors(gboolean reload);
void scan_memory(gboolean reload);
................................................................................
void scan_battery(gboolean reload);
void scan_pci(gboolean reload);
void scan_sensors(gboolean reload);
void scan_printers(gboolean reload);
void scan_storage(gboolean reload);
void scan_input(gboolean reload);
void scan_usb(gboolean reload);
#if defined(ARCH_x86) || defined(ARCH_x86_64)
void scan_dmi(gboolean reload);
void scan_spd(gboolean reload);
#endif
void scan_device_resources(gboolean reload);

gchar *hi_more_info(gchar *entry);

................................................................................
    {"PCI Devices", "devices.png", callback_pci, scan_pci, MODULE_FLAG_NONE},
    {"USB Devices", "usb.png", callback_usb, scan_usb, MODULE_FLAG_NONE},
    {"Printers", "printer.png", callback_printers, scan_printers, MODULE_FLAG_NONE},
    {"Battery", "battery.png", callback_battery, scan_battery, MODULE_FLAG_NONE},
    {"Sensors", "therm.png", callback_sensors, scan_sensors, MODULE_FLAG_NONE},
    {"Input Devices", "inputdevices.png", callback_input, scan_input, MODULE_FLAG_NONE},
    {"Storage", "hdd.png", callback_storage, scan_storage, MODULE_FLAG_NONE},
#if defined(ARCH_x86) || defined(ARCH_x86_64)
    {"DMI", "computer.png", callback_dmi, scan_dmi, MODULE_FLAG_NONE},
    {"Memory SPD", "memory.png", callback_spd, scan_spd, MODULE_FLAG_NONE},
#endif	/* x86 or x86_64 */
    {"Resources", "resources.png", callback_device_resources, scan_device_resources, MODULE_FLAG_NONE},
    {NULL}
};

................................................................................

    if (info)
	return g_strdup(info);

    return g_strdup(field);
}

#if defined(ARCH_x86) || defined(ARCH_x86_64)
void scan_dmi(gboolean reload)
{
    SCAN_START();
    __scan_dmi();
    SCAN_END();
}

................................................................................
}

gchar *callback_processors()
{
    return processor_get_info(processors);
}

#if defined(ARCH_x86) || defined(ARCH_x86_64)
gchar *callback_dmi()
{
    return g_strdup(dmi_info);
}

gchar *callback_spd()
{
................................................................................
             .save_to = "pci.ids",
             .get_data = NULL
        };

        sync_manager_add_entry(&se);
    }

#if defined(ARCH_x86) || defined(ARCH_x86_64)
    {
      static SyncEntry se = {
        .fancy_name = "Update CPU feature database",
        .name = "RecvCPUFlags",
        .save_to = "cpuflags.conf",
        .get_data = NULL
      };