From: Ben Pfaff Date: Thu, 9 Dec 2010 20:31:31 +0000 (-0800) Subject: ofp-print: Print every flow on a new line for NXST_FLOW replies too. X-Git-Tag: v1.1.0~693 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8961de6adfd44216f47007ff75fd1cea213d7e31;p=sliver-openvswitch.git ofp-print: Print every flow on a new line for NXST_FLOW replies too. This makes NXST_FLOW formatting consistent with OFPST_FLOW. Suggested-by: Justin Pettit --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index a49c3854c..5370c9aaf 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1221,6 +1221,8 @@ ofp_print_nxst_flow_reply(struct ds *string, const struct ofp_header *oh) int match_len; int error; + ds_put_char(string, '\n'); + fs = ofpbuf_try_pull(&b, sizeof *fs); if (!fs) { ds_put_format(string, " ***%td leftover bytes at end***", b.size); @@ -1276,7 +1278,6 @@ ofp_print_nxst_flow_reply(struct ds *string, const struct ofp_header *oh) ds_put_char(string, ' '); ofp_print_actions(string, (const struct ofp_action_header *) actions, n_actions * sizeof *actions); - ds_put_char(string, '\n'); } } diff --git a/tests/ofproto.at b/tests/ofproto.at index 9777e1613..907ac13bc 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -66,7 +66,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=0]) AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1]) AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION], [0], [dnl -NXST_FLOW reply: cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=1 actions=output:0 +NXST_FLOW reply: + cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=1 actions=output:0 cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=65534 actions=output:1 ]) AT_CHECK([ovs-ofctl del-flows br0])