diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-12 16:13:21 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-12 17:15:35 +0200 |
commit | 9106a750cd76d4a76c7a60294ce3a43eede166c9 (patch) | |
tree | 507177651bf4654e714665a6f2e3ab1ed330e1cf /conf/conf.c | |
parent | 8a2cbb88d1657b4aee366605cb3d8ffcc5d3f90a (diff) |
Add CLI command to test reconfiguration status
Based on patch from Kenth Eriksson <kenth.eriksson@infinera.com>.
Diffstat (limited to 'conf/conf.c')
-rw-r--r-- | conf/conf.c | 18 |
1 files changed, 18 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 |