]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: adjust the format of display command
authoranlan_cs <anlan_cs@tom.com>
Fri, 3 May 2024 15:04:05 +0000 (23:04 +0800)
committeranlan_cs <anlan_cs@tom.com>
Fri, 3 May 2024 15:41:36 +0000 (23:41 +0800)
Before:
```
anlan# show isis neighbor
Area xx:
  System Id           Interface   L  State        Holdtime SNPA
 0023.0000.0000      enp1s0      2  Down          Expiring2c53.4a30.0820
```

After:
```
anlan# show isis neighbor
Area xx:
 System Id           Interface   L  State         Holdtime SNPA
 0023.0000.0000      enp1s0      2  Down          Expiring 2c53.4a30.0820
```

The `-` display format caused by no hello packet in `isis_adj_print_vty()`
is same as that of above "Expiring".

Signed-off-by: anlan_cs <anlan_cs@tom.com>
isisd/isis_adjacency.c
isisd/isisd.c

index 7acd3a2b4e565e551f844ffbd1ed0f747982e571..430bee92bf9754bb56cc1bb458f98ee5ac2a8424 100644 (file)
@@ -726,13 +726,13 @@ void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
                now = time(NULL);
                if (adj->last_upd) {
                        if (adj->last_upd + adj->hold_time < now)
-                               vty_out(vty, " Expiring");
+                               vty_out(vty, " Expiring ");
                        else
                                vty_out(vty, " %-9llu",
                                        (unsigned long long)adj->last_upd
                                                + adj->hold_time - now);
                } else
-                       vty_out(vty, "-        ");
+                       vty_out(vty, " -        ");
                vty_out(vty, "%-10pSY", adj->snpa);
                vty_out(vty, "\n");
        }
index 772eb9708dfc450fc2c9fbe279b9d0f20a1136f4..c1eda4822a439eb80a6558959373c39929a1cbca 100644 (file)
@@ -1318,7 +1318,7 @@ static void isis_neighbor_common_vty(struct vty *vty, const char *id,
 
                if (detail == ISIS_UI_LEVEL_BRIEF)
                        vty_out(vty,
-                               "  System Id           Interface   L  State        Holdtime SNPA\n");
+                               " System Id           Interface   L  State         Holdtime SNPA\n");
 
                for (ALL_LIST_ELEMENTS_RO(area->circuit_list, cnode, circuit)) {
                        if (circuit->circ_type == CIRCUIT_T_BROADCAST) {