diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/conf.c | 18 | ||||
-rw-r--r-- | conf/conf.h | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/conf/conf.c b/conf/conf.c index 439aa41d..d6b3e8e8 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -444,6 +444,24 @@ config_undo(void) return CONF_PROGRESS; } +int +config_status(void) +{ + if (shutting_down) + return CONF_SHUTDOWN; + + if (configuring) + return future_cftype ? CONF_QUEUED : CONF_PROGRESS; + + return CONF_DONE; +} + +btime +config_timer_status(void) +{ + return tm_active(config_timer) ? tm_remains(config_timer) : -1; +} + extern void cmd_reconfig_undo_notify(void); static void diff --git a/conf/conf.h b/conf/conf.h index 354a4da8..51dcb989 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -69,6 +69,8 @@ void config_free(struct config *); int config_commit(struct config *, int type, uint timeout); int config_confirm(void); int config_undo(void); +int config_status(void); +btime config_timer_status(void); void config_init(void); void cf_error(const char *msg, ...) NORET; void config_add_obstacle(struct config *); |