As for chain and table. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@xxxxxxxxxxxxxxx> --- src/rule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rule.c b/src/rule.c index 53d2ebf..887b506 100644 --- a/src/rule.c +++ b/src/rule.c @@ -787,20 +787,20 @@ static int nft_rule_snprintf_default(char *buf, size_t size, struct nft_rule *r, struct nft_rule_expr *expr; int ret, len = size, offset = 0; - ret = snprintf(buf, len, "%s %s %s %"PRIu64" %"PRIu64"\n", + ret = snprintf(buf, len, "%s %s %s %"PRIu64" %"PRIu64"", nft_family2str(r->family), r->table, r->chain, r->handle, r->position); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); list_for_each_entry(expr, &r->expr_list, head) { - ret = snprintf(buf+offset, len, " [ %s ", expr->ops->name); + ret = snprintf(buf+offset, len, "\n [ %s ", expr->ops->name); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = nft_rule_expr_snprintf(buf+offset, len, expr, type, flags); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - ret = snprintf(buf+offset, len, "]\n"); + ret = snprintf(buf+offset, len, "]"); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); } -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html