commit f2d2d8611103b65f1d2fde42d1cdc5c1c23dac92 from: smytht via: GitHub date: Sun Jun 23 10:19:11 2024 UTC Update if.c with fix for show interface status command from ryan-sg ryan-sg oticed a missing \n, causing the loopback interface to appear on the same line as the header: % Name Status Link Routing-Domain Media lo0 up - 0 vio0 up active 0 Ethernet vio1 down active 0 Ethernet vio2 down active 0 Ethernet vio3 up active 0 Ethernet enc0 down active 0 pflog0 up - 0 pair0 up active 0 Ethernet pair1 up no carrier 2 Ethernet lo2 down - 2 pair2 up active 3 Ethernet lo3 down - 3 The following patch seems to be all that is needed. Troubles with github and ssh keys right now, not worth the time to try and make a pull request over 2 chars :-) index 4ce758e..48cb569 100644 --- a/if.c +++ b/if.c @@ -302,7 +302,7 @@ show_int(int argc, char **argv, FILE *outfile) close(ifs); return 0; } - fputs("% Name Status Link Routing-Domain Media", + fputs("% Name Status Link Routing-Domain Media\n", outfile); for (ifnp = ifn_list; ifnp->if_name != NULL; ifnp++) show_int_status(ifnp->if_name, ifs, outfile); Results: % Name Status Link Routing-Domain Media lo0 up - 0 vio0 up active 0 Ethernet vio1 down active 0 Ethernet vio2 down active 0 Ethernet vio3 up active 0 Ethernet enc0 down active 0 pflog0 up - 0 pair0 up active 0 Ethernet pair1 up no carrier 2 Ethernet lo2 down - 2 pair2 up active 3 Ethernet lo3 down - 3 commit - 270bb0cb01bae8fb3f5cff6279e1f05d9a3547ec commit + f2d2d8611103b65f1d2fde42d1cdc5c1c23dac92 blob - 4ce758eef8b0412bc079a8523cea16c21a2cf9ca blob + 48cb569a1a8b1a6a87f1a766c432cf90964d7714 --- if.c +++ if.c @@ -302,7 +302,7 @@ show_int(int argc, char **argv, FILE *outfile) close(ifs); return 0; } - fputs("% Name Status Link Routing-Domain Media", + fputs("% Name Status Link Routing-Domain Media\n", outfile); for (ifnp = ifn_list; ifnp->if_name != NULL; ifnp++) show_int_status(ifnp->if_name, ifs, outfile);