diff options
author | Burt P <pburt0@gmail.com> | 2017-07-09 12:59:06 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-12 19:38:41 -0700 |
commit | 4d0673ba25053b8bb93a911116393bfa13b21c3e (patch) | |
tree | c9429484bb4c78fb030fb4df114ee8e19549d578 /modules/devices | |
parent | 7202eb2b3107ec9e838e8ac357dc603a23cf5546 (diff) |
Add CMake options to allow testing various platform's processor.c
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices')
-rw-r--r-- | modules/devices/alpha/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/arm/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/ia64/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/m68k/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/mips/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/parisc/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/ppc/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/s390/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/sh/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/sparc/processor.c | 2 | ||||
-rw-r--r-- | modules/devices/x86/processor.c | 6 |
11 files changed, 25 insertions, 1 deletions
diff --git a/modules/devices/alpha/processor.c b/modules/devices/alpha/processor.c index 71e886e7..ae58058f 100644 --- a/modules/devices/alpha/processor.c +++ b/modules/devices/alpha/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/arm/processor.c b/modules/devices/arm/processor.c index 410c3a71..d83be9ec 100644 --- a/modules/devices/arm/processor.c +++ b/modules/devices/arm/processor.c @@ -74,7 +74,9 @@ int processor_has_flag(gchar * strflags, gchar * strflag) return ret; } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/ia64/processor.c b/modules/devices/ia64/processor.c index 7a05c51a..57cc94e0 100644 --- a/modules/devices/ia64/processor.c +++ b/modules/devices/ia64/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/m68k/processor.c b/modules/devices/m68k/processor.c index 2137b9a4..995e34af 100644 --- a/modules/devices/m68k/processor.c +++ b/modules/devices/m68k/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/mips/processor.c b/modules/devices/mips/processor.c index 4a0498ce..ca9f44bb 100644 --- a/modules/devices/mips/processor.c +++ b/modules/devices/mips/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/parisc/processor.c b/modules/devices/parisc/processor.c index 66a75fe5..99248e9e 100644 --- a/modules/devices/parisc/processor.c +++ b/modules/devices/parisc/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processors_scan(void) diff --git a/modules/devices/ppc/processor.c b/modules/devices/ppc/processor.c index 10a53a65..59ebab01 100644 --- a/modules/devices/ppc/processor.c +++ b/modules/devices/ppc/processor.c @@ -47,7 +47,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/s390/processor.c b/modules/devices/s390/processor.c index b47fa67b..0e8cafb6 100644 --- a/modules/devices/s390/processor.c +++ b/modules/devices/s390/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/sh/processor.c b/modules/devices/sh/processor.c index 3f91efbd..a2018ff8 100644 --- a/modules/devices/sh/processor.c +++ b/modules/devices/sh/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/sparc/processor.c b/modules/devices/sparc/processor.c index 0557c0b6..9310c45d 100644 --- a/modules/devices/sparc/processor.c +++ b/modules/devices/sparc/processor.c @@ -27,7 +27,9 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO #define PROC_CPUINFO "/proc/cpuinfo" +#endif GSList * processor_scan(void) diff --git a/modules/devices/x86/processor.c b/modules/devices/x86/processor.c index f8543c17..2ca40136 100644 --- a/modules/devices/x86/processor.c +++ b/modules/devices/x86/processor.c @@ -254,6 +254,10 @@ gchar *byte_order_str() { #endif } +#ifndef PROC_CPUINFO +#define PROC_CPUINFO "/proc/cpuinfo" +#endif + GSList *processor_scan(void) { GSList *procs = NULL, *l = NULL; @@ -261,7 +265,7 @@ GSList *processor_scan(void) FILE *cpuinfo; gchar buffer[512]; - cpuinfo = fopen("/proc/cpuinfo", "r"); + cpuinfo = fopen(PROC_CPUINFO, "r"); if (!cpuinfo) return NULL; |