cfm: Cleanup output of ovs-appctl "cfm/show" command.
authorJustin Pettit <jpettit@nicira.com>
Fri, 30 Sep 2011 01:36:09 +0000 (18:36 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 30 Sep 2011 01:52:29 +0000 (18:52 -0700)
When no remote MPIDs were found, the output would print an extra newline.
If multiple remote MPIDs were found, the lines would run together.  This
commit cleans things up a bit by just printing each item on its own line
without any blank lines.

lib/cfm.c

index ff401dc..3f3dcd2 100644 (file)
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -533,12 +533,11 @@ cfm_print_details(struct ds *ds, const struct cfm *cfm)
     ds_put_format(ds, "\tnext fault check: %lldms\n",
                   timer_msecs_until_expired(&cfm->fault_timer));
 
-    ds_put_cstr(ds, "\n");
     HMAP_FOR_EACH (rmp, node, &cfm->remote_mps) {
         ds_put_format(ds, "Remote MPID %"PRIu64":%s\n",
                       rmp->mpid,
                       rmp->rdi ? " rdi" : "");
-        ds_put_format(ds, "\trecv since check: %s",
+        ds_put_format(ds, "\trecv since check: %s\n",
                       rmp->recv ? "true" : "false");
     }
 }