chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nspawn: fix invocation of the raw clone() system call on s390 and cris
[elogind.git]
/
src
/
shared
/
architecture.c
diff --git
a/src/shared/architecture.c
b/src/shared/architecture.c
index fcdb3d54b8d0e88349aa7240ee276ada97002de3..34c5a53fa9f6ffa2a2b9f96d59ffcc117c809d32 100644
(file)
--- a/
src/shared/architecture.c
+++ b/
src/shared/architecture.c
@@
-23,7
+23,7
@@
#include "architecture.h"
#include "architecture.h"
-
Architecture
uname_architecture(void) {
+
int
uname_architecture(void) {
/* Return a sanitized enum identifying the architecture we are
* running on. This is based on uname(), and the user may
/* Return a sanitized enum identifying the architecture we are
* running on. This is based on uname(), and the user may
@@
-41,7
+41,7
@@
Architecture uname_architecture(void) {
static const struct {
const char *machine;
static const struct {
const char *machine;
-
Architecture
arch;
+
int
arch;
} arch_map[] = {
#if defined(__x86_64__) || defined(__i386__)
{ "x86_64", ARCHITECTURE_X86_64 },
} arch_map[] = {
#if defined(__x86_64__) || defined(__i386__)
{ "x86_64", ARCHITECTURE_X86_64 },
@@
-114,12
+114,14
@@
Architecture uname_architecture(void) {
{ "m68k", ARCHITECTURE_M68K },
#elif defined(__tilegx__)
{ "tilegx", ARCHITECTURE_TILEGX },
{ "m68k", ARCHITECTURE_M68K },
#elif defined(__tilegx__)
{ "tilegx", ARCHITECTURE_TILEGX },
+#elif defined(__cris__)
+ { "crisv32", ARCHITECTURE_CRIS },
#else
#error "Please register your architecture here!"
#endif
};
#else
#error "Please register your architecture here!"
#endif
};
- static
Architecture
cached = _ARCHITECTURE_INVALID;
+ static
int
cached = _ARCHITECTURE_INVALID;
struct utsname u;
unsigned i;
struct utsname u;
unsigned i;
@@
-151,7
+153,9
@@
static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_SPARC] = "sparc",
[ARCHITECTURE_SPARC64] = "sparc64",
[ARCHITECTURE_MIPS] = "mips",
[ARCHITECTURE_SPARC] = "sparc",
[ARCHITECTURE_SPARC64] = "sparc64",
[ARCHITECTURE_MIPS] = "mips",
+ [ARCHITECTURE_MIPS_LE] = "mips-le",
[ARCHITECTURE_MIPS64] = "mips64",
[ARCHITECTURE_MIPS64] = "mips64",
+ [ARCHITECTURE_MIPS64_LE] = "mips64-le",
[ARCHITECTURE_ALPHA] = "alpha",
[ARCHITECTURE_ARM] = "arm",
[ARCHITECTURE_ARM_BE] = "arm-be",
[ARCHITECTURE_ALPHA] = "alpha",
[ARCHITECTURE_ARM] = "arm",
[ARCHITECTURE_ARM_BE] = "arm-be",
@@
-161,6
+165,7
@@
static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_SH64] = "sh64",
[ARCHITECTURE_M68K] = "m68k",
[ARCHITECTURE_TILEGX] = "tilegx",
[ARCHITECTURE_SH64] = "sh64",
[ARCHITECTURE_M68K] = "m68k",
[ARCHITECTURE_TILEGX] = "tilegx",
+ [ARCHITECTURE_CRIS] = "cris",
};
};
-DEFINE_STRING_TABLE_LOOKUP(architecture,
Architecture
);
+DEFINE_STRING_TABLE_LOOKUP(architecture,
int
);