diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-02-21 02:28:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-21 02:43:14 +0100 |
commit | d9d93745cd2efcdfca8f82d798e61e0ee70cef5c (patch) | |
tree | 856fb7d01ac05a700e4740f15f70684ea5253422 /src | |
parent | 099524d7b0df690e3361ffc3fe3c6aed0558b4fc (diff) |
hostnamectl: should the sanitized arch, not the native uname() one
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 3 | ||||
-rw-r--r-- | src/hostname/hostnamectl.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c index 7566b0a74b..086e283dc6 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -51,6 +51,7 @@ #include "strv.h" #include "def.h" #include "virt.h" +#include "architecture.h" #include "watchdog.h" #include "path-util.h" #include "switch-root.h" @@ -1510,6 +1511,8 @@ int main(int argc, char *argv[]) { if (virtualization) log_info("Detected virtualization '%s'.", virtualization); + log_info("Detected architecture '%s'.", architecture_to_string(uname_architecture())); + if (in_initrd()) log_info("Running in initial RAM disk."); diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index afbf37db51..e455249e9e 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -39,6 +39,7 @@ #include "strv.h" #include "sd-id128.h" #include "virt.h" +#include "architecture.h" #include "fileio.h" static bool arg_ask_password = true; @@ -121,7 +122,9 @@ static void print_status_info(StatusInfo *i) { assert_se(uname(&u) >= 0); printf(" Kernel: %s %s\n" - " Architecture: %s\n", u.sysname, u.release, u.machine); + " Architecture: %s\n", + u.sysname, u.release, + architecture_to_string(uname_architecture())); } |