Lines Matching defs:enabled
200 c->use_ntp = STR_IN_SET(s, "enabled", "enabled-runtime");
205 static int context_start_ntp(sd_bus *bus, sd_bus_error *error, bool enabled) {
216 enabled ? "StartUnit" : "StopUnit",
234 static int context_enable_ntp(sd_bus *bus, sd_bus_error *error, bool enabled) {
240 if (enabled)
515 return sd_bus_error_setf(error, BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED, "Automatic time synchronization is enabled");
589 int enabled, interactive;
596 r = sd_bus_message_read(m, "bb", &enabled, &interactive);
600 if ((bool)enabled == c->use_ntp)
617 r = context_enable_ntp(sd_bus_message_get_bus(m), error, enabled);
621 r = context_start_ntp(sd_bus_message_get_bus(m), error, enabled);
625 c->use_ntp = enabled;
626 log_info("Set NTP to %s", enabled ? "enabled" : "disabled");
719 log_error_errno(r, "Failed to determine whether NTP is enabled: %m");