From: Ben Pfaff Date: Wed, 28 May 2008 17:46:40 +0000 (-0700) Subject: Pretty-print port numbers when printing ofp_switch_features messages. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f81e793e56594874da61aeff0ecfbaded8b3c2d;p=openvswitch Pretty-print port numbers when printing ofp_switch_features messages. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 4d47279e..9509ff6a 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -307,8 +307,10 @@ ofp_print_phy_port(struct ds *string, const struct ofp_phy_port *port) } name[j] = '\0'; - ds_put_format(string, " %2d(%s): addr:"ETH_ADDR_FMT", speed:%d, flags:%#x, " - "feat:%#x\n", ntohs(port->port_no), name, + ds_put_char(string, ' '); + ofp_print_port_name(string, ntohs(port->port_no)); + ds_put_format(string, "(%s): addr:"ETH_ADDR_FMT", speed:%d, flags:%#x, " + "feat:%#x\n", name, ETH_ADDR_ARGS(port->hw_addr), ntohl(port->speed), ntohl(port->flags), ntohl(port->features)); }