summaryrefslogtreecommitdiff
path: root/src/shared/architecture.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 00:49:44 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-06 14:21:10 +0100
commit592fd144ae313855f48d0ca52a103013b41e5d59 (patch)
tree45f239ffa2dc6fb375785d8e8a3ddbda78c829e4 /src/shared/architecture.c
parent58f2fab16da947052756b7f9ace40f6ee7fa1519 (diff)
condition: properly allow passing back errors from condition checks
Diffstat (limited to 'src/shared/architecture.c')
-rw-r--r--src/shared/architecture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
index dc45f3589d..34c5a53fa9 100644
--- a/src/shared/architecture.c
+++ b/src/shared/architecture.c
@@ -23,7 +23,7 @@
#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
@@ -41,7 +41,7 @@ Architecture uname_architecture(void) {
static const struct {
const char *machine;
- Architecture arch;
+ int arch;
} arch_map[] = {
#if defined(__x86_64__) || defined(__i386__)
{ "x86_64", ARCHITECTURE_X86_64 },
@@ -121,7 +121,7 @@ Architecture uname_architecture(void) {
#endif
};
- static Architecture cached = _ARCHITECTURE_INVALID;
+ static int cached = _ARCHITECTURE_INVALID;
struct utsname u;
unsigned i;
@@ -168,4 +168,4 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_CRIS] = "cris",
};
-DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture);
+DEFINE_STRING_TABLE_LOOKUP(architecture, int);