From fab8fadba0670ab21c8f68eab22e106be40d2ceb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 8 Dec 2010 12:05:20 -0800 Subject: [PATCH] ofp-print: Print each flow at the start of a line. Before this commit, the first flow in "ovs-ofctl dump-flows" output was printed on the same line as the OpenFlow message type name and the xid. With this commit, that flow is put on a line of its own, like all of the other flows in the output. Requested-by: Paul Ingram CC: Paul Ingram --- lib/ofp-print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index e199ac9f..4141b9f9 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1069,6 +1069,8 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh, ptrdiff_t bytes_left = body + len - pos; size_t length; + ds_put_char(string, '\n'); + if (bytes_left < sizeof *fs) { if (bytes_left != 0) { ds_put_format(string, " ***%td leftover bytes at end***", @@ -1118,7 +1120,6 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh, } ofp_print_match(string, &fs->match, verbosity); ofp_print_actions(string, fs->actions, length - sizeof *fs); - ds_put_char(string, '\n'); pos += length; } -- 2.30.2