chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2852ae2
)
timedatectl: show CanNTP field
author
Lennart Poettering
<lennart@poettering.net>
Fri, 22 Mar 2013 20:17:45 +0000
(21:17 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 22 Mar 2013 20:18:10 +0000
(21:18 +0100)
src/timedate/timedatectl.c
patch
|
blob
|
history
diff --git
a/src/timedate/timedatectl.c
b/src/timedate/timedatectl.c
index ef2ea0830006bfd1cfee75fb4745a008ebe5a5f5..bcd935a6c0436e4656df3f5c15c60e5616f3cd7d 100644
(file)
--- 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;
const char *timezone;
bool local_rtc;
bool ntp;
+ bool can_ntp;
} StatusInfo;
static bool ntp_synced(void) {
} 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,
" 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));
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;
i->local_rtc = b;
else if (streq(name, "NTP"))
i->ntp = b;
+ else if (streq(name, "CanNTP"))
+ i->can_ntp = b;
}
}
}
}