mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
hostnamectl: should the sanitized arch, not the native uname() one
This commit is contained in:
parent
099524d7b0
commit
d9d93745cd
@ -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.");
|
||||
|
||||
|
@ -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()));
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user