forked from Mirror/frr
watchfrr: Rename restart_phase_t to enum restart_phase
This will align with our coding standards. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
b277f22c93
commit
f1692c510b
|
@ -70,14 +70,14 @@ struct thread_master *master;
|
||||||
static bool watch_only = false;
|
static bool watch_only = false;
|
||||||
const char *pathspace;
|
const char *pathspace;
|
||||||
|
|
||||||
typedef enum {
|
enum restart_phase {
|
||||||
PHASE_NONE = 0,
|
PHASE_NONE = 0,
|
||||||
PHASE_INIT,
|
PHASE_INIT,
|
||||||
PHASE_STOPS_PENDING,
|
PHASE_STOPS_PENDING,
|
||||||
PHASE_WAITING_DOWN,
|
PHASE_WAITING_DOWN,
|
||||||
PHASE_ZEBRA_RESTART_PENDING,
|
PHASE_ZEBRA_RESTART_PENDING,
|
||||||
PHASE_WAITING_ZEBRA_UP
|
PHASE_WAITING_ZEBRA_UP
|
||||||
} restart_phase_t;
|
};
|
||||||
|
|
||||||
static const char *const phase_str[] = {
|
static const char *const phase_str[] = {
|
||||||
"Idle",
|
"Idle",
|
||||||
|
@ -103,7 +103,7 @@ struct restart_info {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct global_state {
|
static struct global_state {
|
||||||
restart_phase_t phase;
|
enum restart_phase phase;
|
||||||
struct thread *t_phase_hanging;
|
struct thread *t_phase_hanging;
|
||||||
struct thread *t_startup_timeout;
|
struct thread *t_startup_timeout;
|
||||||
const char *vtydir;
|
const char *vtydir;
|
||||||
|
@ -848,7 +848,7 @@ static void phase_hanging(struct thread *t_hanging)
|
||||||
gs.phase = PHASE_NONE;
|
gs.phase = PHASE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_phase(restart_phase_t new_phase)
|
static void set_phase(enum restart_phase new_phase)
|
||||||
{
|
{
|
||||||
gs.phase = new_phase;
|
gs.phase = new_phase;
|
||||||
thread_cancel(&gs.t_phase_hanging);
|
thread_cancel(&gs.t_phase_hanging);
|
||||||
|
|
Loading…
Reference in a new issue