summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-22 21:17:45 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-22 21:18:10 +0100
commit1a5613266a93ddb197bbae137cd61fae25600718 (patch)
tree1d43f671bc960f3d535874b3ef555d1722a3dd43
parent2852ae213402930b868d366b38c717991c97785c (diff)
timedatectl: show CanNTP field
-rw-r--r--src/timedate/timedatectl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index ef2ea08300..bcd935a6c0 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -68,6 +68,7 @@ typedef struct StatusInfo {
const char *timezone;
bool local_rtc;
bool ntp;
+ bool can_ntp;
} StatusInfo;
static bool ntp_synced(void) {
@@ -153,7 +154,7 @@ static void print_status_info(StatusInfo *i) {
" RTC in local TZ: %s\n",
strna(i->timezone),
a,
- yes_no(i->ntp),
+ i->can_ntp ? yes_no(i->ntp) : "n/a",
yes_no(ntp_synced()),
yes_no(i->local_rtc));
@@ -228,6 +229,8 @@ static int status_property(const char *name, DBusMessageIter *iter, StatusInfo *
i->local_rtc = b;
else if (streq(name, "NTP"))
i->ntp = b;
+ else if (streq(name, "CanNTP"))
+ i->can_ntp = b;
}
}