ovn-nbctl: Use "ctx->output" instead of printf for list ACLs.
authorJustin Pettit <jpettit@ovn.org>
Wed, 18 May 2016 18:55:02 +0000 (11:55 -0700)
committerJustin Pettit <jpettit@ovn.org>
Fri, 10 Jun 2016 23:17:46 +0000 (16:17 -0700)
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ryan Moats <rmoats@us.ibm.com>
ovn/utilities/ovn-nbctl.c

index 321040e..7672952 100644 (file)
@@ -1292,8 +1292,9 @@ nbctl_acl_list(struct ctl_context *ctx)
 
     for (i = 0; i < lswitch->n_acls; i++) {
         const struct nbrec_acl *acl = acls[i];
-        printf("%10s %5"PRId64" (%s) %s%s\n", acl->direction, acl->priority,
-                acl->match, acl->action, acl->log ? " log" : "");
+        ds_put_format(&ctx->output, "%10s %5"PRId64" (%s) %s%s\n",
+                      acl->direction, acl->priority,
+                      acl->match, acl->action, acl->log ? " log" : "");
     }
 
     free(acls);