summaryrefslogtreecommitdiff
path: root/src/hostname/hostnamectl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostname/hostnamectl.c')
-rw-r--r--src/hostname/hostnamectl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
index 66015c2f4c..c6d72b5417 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/hostname/hostnamectl.c
@@ -110,6 +110,8 @@ static void print_status_info(StatusInfo *i) {
"PRETTY_NAME", &pretty_name,
"CPE_NAME", &cpe_name,
NULL);
+ if (r < 0)
+ log_warning("Failed to read /etc/os-release: %s", strerror(-r));
if (!isempty(pretty_name))
printf(" Operating System: %s\n", pretty_name);