- if (streq_ptr(operational_state, "routable")) {
- on_color_oper = ansi_highlight_green();
- off_color_oper = ansi_highlight_off();
- } else if (streq_ptr(operational_state, "degraded")) {
- on_color_oper = ansi_highlight_yellow();
- off_color_oper = ansi_highlight_off();
- }
-
- if (streq_ptr(setup_state, "configured")) {
- on_color = ansi_highlight_green();
- off_color = ansi_highlight_off();
- } else if (streq_ptr(setup_state, "configuring")) {
- on_color = ansi_highlight_yellow();
- off_color = ansi_highlight_off();
- } else if (streq_ptr(setup_state, "failed") ||
- streq_ptr(setup_state, "linger")) {
- on_color = ansi_highlight_red();
- off_color = ansi_highlight_off();
- }
-
- printf("%3i %-16s %-10s %s%-11s%s %s%-10s%s\n", links[i].ifindex,
- links[i].name, strna(t), on_color, strna(setup_state), off_color,
- on_color_oper, strna(operational_state), off_color_oper);
+ printf("%3i %-16s %-18s %s%-11s%s %s%-10s%s\n",
+ links[i].ifindex, links[i].name, strna(t),
+ on_color_operational, strna(operational_state), off_color_operational,
+ on_color_setup, strna(setup_state), off_color_setup);