chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
efivars: use more _cleanup_
[elogind.git]
/
src
/
shared
/
architecture.c
diff --git
a/src/shared/architecture.c
b/src/shared/architecture.c
index dc45f3589d010c7129f6909f3f0911081c8fef81..884abdd3ea57b2707036d0b02fba153633618879 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 },
@@
-108,8
+108,12
@@
Architecture uname_architecture(void) {
{ "armv8l", ARCHITECTURE_ARM },
{ "armv8b", ARCHITECTURE_ARM_BE },
#elif defined(__sh__) || defined(__sh64__)
{ "armv8l", ARCHITECTURE_ARM },
{ "armv8b", ARCHITECTURE_ARM_BE },
#elif defined(__sh__) || defined(__sh64__)
- { "sh64", ARCHITECTURE_SH64 },
- { "sh", ARCHITECTURE_SH },
+ { "sh5", ARCHITECTURE_SH64 },
+ { "sh2", ARCHITECTURE_SH },
+ { "sh2a", ARCHITECTURE_SH },
+ { "sh3", ARCHITECTURE_SH },
+ { "sh4", ARCHITECTURE_SH },
+ { "sh4a", ARCHITECTURE_SH },
#elif defined(__m68k__)
{ "m68k", ARCHITECTURE_M68K },
#elif defined(__tilegx__)
#elif defined(__m68k__)
{ "m68k", ARCHITECTURE_M68K },
#elif defined(__tilegx__)
@@
-121,7
+125,7
@@
Architecture uname_architecture(void) {
#endif
};
#endif
};
- static
Architecture
cached = _ARCHITECTURE_INVALID;
+ static
int
cached = _ARCHITECTURE_INVALID;
struct utsname u;
unsigned i;
struct utsname u;
unsigned i;
@@
-168,4
+172,4
@@
static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_CRIS] = "cris",
};
[ARCHITECTURE_CRIS] = "cris",
};
-DEFINE_STRING_TABLE_LOOKUP(architecture,
Architecture
);
+DEFINE_STRING_TABLE_LOOKUP(architecture,
int
);