aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2012-05-30 01:52:10 +0200
committerhasufell <julian.ospald@googlemail.com>2012-05-30 01:52:10 +0200
commite05f8494126c999ae6227195442126cbb7d630c5 (patch)
tree9e6d06f762dbd9e0b948f080ce10aaa6a90265a6
parente0e747839b239e87cd04ba0f7eb18f632714398a (diff)
Split x86 and x86_64 arches
lib suffix in hardinfo/binreloc.c is already supported and will be respected now
-rw-r--r--CMakeLists.txt4
-rw-r--r--includes/devices.h6
l---------includes/x86_641
-rw-r--r--modules/devices.c12
l---------modules/devices/x86_641
5 files changed, 14 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b270e9c..3e1edc66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,8 +15,10 @@ else()
message(FATAL_ERROR "Unsupported operating system: ${CMAKE_HOST_SYSTEM_NAME}")
endif()
-if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "i[3-6]86|x86_64")
+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")
diff --git a/includes/devices.h b/includes/devices.h
index 3af92f60..f88e5325 100644
--- a/includes/devices.h
+++ b/includes/devices.h
@@ -64,7 +64,7 @@ void scan_sensors_do(void);
void sensors_init(void);
void sensors_shutdown(void);
-#ifdef ARCH_x86
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
/* SPD */
void scan_spd_do(void);
#endif /* ARCH_x86 */
@@ -88,9 +88,9 @@ extern GHashTable *sensor_compute;
extern GHashTable *sensor_labels;
extern GModule *cups;
-#ifdef ARCH_x86
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
extern gchar *dmi_info;
extern gchar *spd_info;
#endif
-#endif /* __DEVICES_H__ */ \ No newline at end of file
+#endif /* __DEVICES_H__ */
diff --git a/includes/x86_64 b/includes/x86_64
new file mode 120000
index 00000000..de1ff735
--- /dev/null
+++ b/includes/x86_64
@@ -0,0 +1 @@
+./x86 \ No newline at end of file
diff --git a/modules/devices.c b/modules/devices.c
index 5f1e61d5..6c6343d5 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -47,7 +47,7 @@ gchar *callback_printers();
gchar *callback_storage();
gchar *callback_input();
gchar *callback_usb();
-#if defined(ARCH_x86)
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
gchar *callback_dmi();
gchar *callback_spd();
#endif
@@ -62,7 +62,7 @@ void scan_printers(gboolean reload);
void scan_storage(gboolean reload);
void scan_input(gboolean reload);
void scan_usb(gboolean reload);
-#if defined(ARCH_x86)
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
void scan_dmi(gboolean reload);
void scan_spd(gboolean reload);
#endif
@@ -80,7 +80,7 @@ static ModuleEntry entries[] = {
{"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)
+#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 */
@@ -235,7 +235,7 @@ gchar *hi_get_field(gchar * field)
return g_strdup(field);
}
-#if defined(ARCH_x86)
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
void scan_dmi(gboolean reload)
{
SCAN_START();
@@ -324,7 +324,7 @@ gchar *callback_processors()
return processor_get_info(processors);
}
-#if defined(ARCH_x86)
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
gchar *callback_dmi()
{
return g_strdup(dmi_info);
@@ -430,7 +430,7 @@ void hi_module_init(void)
sync_manager_add_entry(&se);
}
-#if defined(ARCH_x86)
+#if defined(ARCH_x86) || defined(ARCH_x86_64)
{
static SyncEntry se = {
.fancy_name = "Update CPU feature database",
diff --git a/modules/devices/x86_64 b/modules/devices/x86_64
new file mode 120000
index 00000000..de1ff735
--- /dev/null
+++ b/modules/devices/x86_64
@@ -0,0 +1 @@
+./x86 \ No newline at end of file