[ovs-dev] [PATCH ovn-acl] ovn-sbctl: Adjust width for priority in lflow-list.

Russell Bryant rbryant at redhat.com
Wed Sep 9 01:46:28 UTC 2015


The format string for the output of lflow-list included a width of 3
characters for the priority.  ACLs use priorities up to 5 digits, so
change the width from 3 to 5.  This restores alignment of the next
field, "match".

Signed-off-by: Russell Bryant <rbryant at redhat.com>
---
 ovn/utilities/ovn-sbctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


I did this tiny silly patch against Justin's ovn-acl branch while playing with
it.  Alternatively, we could just drop the width, but I kind of like the
vertical alignment when reading the output.


diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index 8887c95..c001591 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -693,7 +693,7 @@ cmd_lflow_list(struct ctl_context *ctx)
         }
 
         const char *table_name = smap_get(&lflow->external_ids, "stage-name");
-        printf("  table=%" PRId64 "(%8s), priority=%3" PRId64
+        printf("  table=%" PRId64 "(%8s), priority=%5" PRId64
                ", match=(%s), action=(%s)\n",
                lflow->table_id, table_name ? table_name : "",
                lflow->priority, lflow->match, lflow->actions);
-- 
2.4.3




More information about the dev mailing list