diff options
author | 2015-07-18 06:50:24 +0000 | |
---|---|---|
committer | 2015-07-18 06:50:24 +0000 | |
commit | a5ab8f932ac0f4c369fbf69bb115703fef1a4de0 (patch) | |
tree | c6a149bc8da1820b1edeef4bb1c5fd1b421dc965 | |
parent | Add doas -s as a shorthand for doas $SHELL. ok tedu (diff) | |
download | wireguard-openbsd-a5ab8f932ac0f4c369fbf69bb115703fef1a4de0.tar.xz wireguard-openbsd-a5ab8f932ac0f4c369fbf69bb115703fef1a4de0.zip |
Indent the output of bridge rules in ifconfig.
ok reyk@
-rw-r--r-- | sbin/ifconfig/brconfig.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/ifconfig/brconfig.c b/sbin/ifconfig/brconfig.c index 994a0dfb224..1dc1a50b5a5 100644 --- a/sbin/ifconfig/brconfig.c +++ b/sbin/ifconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.8 2013/10/13 12:18:18 reyk Exp $ */ +/* $OpenBSD: brconfig.c,v 1.9 2015/07/18 06:50:24 rzalamena Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -322,7 +322,7 @@ bridge_list(char *delim) stpstates[reqp->ifbr_state], stproles[reqp->ifbr_role]); printf("\n"); - bridge_rules(buf, 0); + bridge_rules(buf, 1); } free(bifc.ifbic_buf); } @@ -742,7 +742,7 @@ bridge_flushrule(const char *ifname, int d) } void -bridge_rules(const char *ifname, int d) +bridge_rules(const char *ifname, int usetab) { char *inbuf = NULL, *inb; struct ifbrlconf ifc; @@ -766,6 +766,10 @@ bridge_rules(const char *ifname, int d) ifrp = ifc.ifbrl_req; for (i = 0; i < ifc.ifbrl_len; i += sizeof(*ifrp)) { ifrp = (struct ifbrlreq *)((caddr_t)ifc.ifbrl_req + i); + + if (usetab) + printf("\t"); + bridge_showrule(ifrp); } } |