Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpctl: cosmetic output fix
To:
tech@openbsd.org
Date:
Tue, 31 Mar 2026 11:17:54 +0200

Download raw body.

Thread
On Tue, Mar 31, 2026 at 11:14:14AM +0200, Claudio Jeker wrote:
> This fixes the show neighbor output of bgpctl:
> 
> Before:
> ...
>   Begin-of-RR              0          0
>   End-of-RR                0          0
>   Queue statistics:
>                   Count      Size      
>   ibuf queue               0          0
>   rib queue                0 -         
> 
> After:
>   Begin-of-RR              0          0
>   End-of-RR                0          0
> 
>   Queue statistics:
>                   Count      Size      
>   ibuf queue               0          0
>   rib queue                0          -
> 
> The '-' indicator that there is no size is now in the right place and
> there is an extra newline before 'Queue statistics:' like for other
> sections.
> 
> OK?

Much better. ok

> -- 
> :wq Claudio
> 
> Index: output.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpctl/output.c,v
> diff -u -p -r1.73 output.c
> --- output.c	17 Mar 2026 09:30:11 -0000	1.73
> +++ output.c	31 Mar 2026 08:53:20 -0000
> @@ -246,14 +246,14 @@ show_neighbor_msgstats(struct peer *p)
>  	    p->stats.refresh_sent_req, p->stats.refresh_rcvd_req);
>  	printf("  %-15s %10llu %10llu\n", "Begin-of-RR",
>  	    p->stats.refresh_sent_borr, p->stats.refresh_rcvd_borr);
> -	printf("  %-15s %10llu %10llu\n", "End-of-RR",
> +	printf("  %-15s %10llu %10llu\n\n", "End-of-RR",
>  	    p->stats.refresh_sent_eorr, p->stats.refresh_rcvd_eorr);
>  
>  	printf("  Queue statistics:\n");
>  	printf("  %-15s %-10s %-10s\n", "", "Count", "Size");
>  	printf("  %-15s %10llu %10llu\n", "ibuf queue",
>  	    p->stats.ibufq_msg_count, p->stats.ibufq_payload_size);
> -	printf("  %-15s %10llu %-10s\n", "rib queue",
> +	printf("  %-15s %10llu %10s\n", "rib queue",
>  	    p->stats.rib_entry_count, "-");
>  }
>  
>