From 63a28b9c25469297bf4333b39499bf304fadd51b Mon Sep 17 00:00:00 2001 From: benno Date: Mon, 10 Sep 2018 11:01:15 +0000 Subject: [PATCH] remove some empty lines from printconf output. ok claudio@ --- usr.sbin/bgpd/bgpd.h | 4 ++-- usr.sbin/bgpd/printconf.c | 14 +++++++------- usr.sbin/bgpd/rde_sets.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 0ab67baae63..c20c6d40fb7 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.338 2018/09/09 11:00:51 benno Exp $ */ +/* $OpenBSD: bgpd.h,v 1.339 2018/09/10 11:01:15 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1167,7 +1167,7 @@ const char *filterset_name(enum action_types); void as_sets_insert(struct as_set_head *, struct as_set *); struct as_set *as_sets_lookup(struct as_set_head *, const char *); void as_sets_free(struct as_set_head *); -void print_as_sets(struct as_set_head *); +void as_sets_print(struct as_set_head *); int as_sets_send(struct imsgbuf *, struct as_set_head *); void as_sets_mark_dirty(struct as_set_head *, struct as_set_head *); diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c index cee088a96d1..2d8ab85cf79 100644 --- a/usr.sbin/bgpd/printconf.c +++ b/usr.sbin/bgpd/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.116 2018/09/09 13:22:41 claudio Exp $ */ +/* $OpenBSD: printconf.c,v 1.117 2018/09/10 11:01:15 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -355,6 +355,7 @@ print_mainconf(struct bgpd_config *conf) if (conf->flags & BGPD_FLAG_NEXTHOP_DEFAULT) printf("nexthop qualify via default\n"); printf("fib-priority %hhu", conf->fib_priority); + printf("\n\n"); } void @@ -790,6 +791,8 @@ print_mrt(struct bgpd_config *conf, u_int32_t pid, u_int32_t gid, else printf(" %d\n", MRT2MC(m)->ReopenTimerInterval); } + if (!LIST_EMPTY(conf->mrt)) + printf("\n"); } void @@ -862,13 +865,12 @@ print_config(struct bgpd_config *conf, struct rib_names *rib_l, struct rdomain *rd; print_mainconf(conf); - printf("\n"); print_prefixsets(conf->prefixsets); - print_as_sets(conf->as_sets); - printf("\n"); + as_sets_print(conf->as_sets); TAILQ_FOREACH(n, net_l, entry) print_network(&n->net, ""); - printf("\n"); + if (!SIMPLEQ_EMPTY(rdom_l)) + printf("\n"); SIMPLEQ_FOREACH(rd, rdom_l, entry) print_rdomain(rd); printf("\n"); @@ -884,9 +886,7 @@ print_config(struct bgpd_config *conf, struct rib_names *rib_l, } printf("\n"); print_mrt(conf, 0, 0, "", ""); - printf("\n"); print_groups(conf, peer_l); - printf("\n"); TAILQ_FOREACH(r, rules_l, entry) print_rule(peer_l, r); } diff --git a/usr.sbin/bgpd/rde_sets.c b/usr.sbin/bgpd/rde_sets.c index fd1ac630717..1dc50cf3fbc 100644 --- a/usr.sbin/bgpd/rde_sets.c +++ b/usr.sbin/bgpd/rde_sets.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_sets.c,v 1.2 2018/09/08 09:29:25 claudio Exp $ */ +/* $OpenBSD: rde_sets.c,v 1.3 2018/09/10 11:01:15 benno Exp $ */ /* * Copyright (c) 2018 Claudio Jeker @@ -77,7 +77,7 @@ as_sets_free(struct as_set_head *as_sets) } void -print_as_sets(struct as_set_head *as_sets) +as_sets_print(struct as_set_head *as_sets) { struct as_set *aset; size_t i; -- 2.20.1