chiark / gitweb /
hostnamed: correct error message
[elogind.git] / src / hostname / hostnamectl.c
index 3150396c70e89d2167e94616f4953d7694cea43f..e455249e9eee86e5067672ea3e9e194ecfd2c2c7 100644 (file)
@@ -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;
@@ -69,7 +70,7 @@ typedef struct StatusInfo {
 } StatusInfo;
 
 static void print_status_info(StatusInfo *i) {
-        sd_id128_t mid, bid;
+        sd_id128_t mid = {}, bid = {};
         int r;
         const char *id = NULL;
         _cleanup_free_ char *pretty_name = NULL, *cpe_name = NULL;
@@ -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()));
 
 }