Pretty-print port numbers when printing ofp_switch_features messages.
authorBen Pfaff <blp@nicira.com>
Wed, 28 May 2008 17:46:40 +0000 (10:46 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 28 May 2008 17:46:54 +0000 (10:46 -0700)
lib/ofp-print.c

index 4d47279e8dbb762e8dd2c42cd9797527b802a3d0..9509ff6a1abc2cb40324907dd22cf2747d75c7f2 100644 (file)
@@ -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));
 }