From patchwork Wed Jul 31 13:21:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alvaro Neira X-Patchwork-Id: 263698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2E2182C00AD for ; Wed, 31 Jul 2013 23:21:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307Ab3GaNVR (ORCPT ); Wed, 31 Jul 2013 09:21:17 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:59605 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803Ab3GaNVQ (ORCPT ); Wed, 31 Jul 2013 09:21:16 -0400 Received: by mail-wi0-f173.google.com with SMTP id en1so5500744wid.0 for ; Wed, 31 Jul 2013 06:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=qXXth8IToT4rawYVcHiqYHna4q48FAMjqPzUvihcNro=; b=jGSLIw1VUWMh+xCY4GLMY0zPD+uo77cWVgjqhfW8rrSEd2Wxk79AmPhv0/l0GDzH9B 0j+stzLyEkdTXZChMmvWJGV74tifPa5WmNo2otBPjJXBFlEQFvpMd7BlYhYHv2y2DkRF lKxzsVXvJLlgSH7rsW8qF7RVIMxfAwLTfHMFz9nGFIWzFvVLBA5OsPMcWEpNe0YOvAdw q33yQ7lF/j8ImaV4/JPpsZCi4aLQYNZ50zG+9qyOF6TQZ+gaFrnmIKbANRdPCBH/EIKp qtVFxG2aYZk4SWm09aZomY6pUEO4TKb1/vZ0dG1ls2D0N57zSHpoJfs5De9VeFD7Wunw bmIA== X-Received: by 10.194.9.229 with SMTP id d5mr19913326wjb.66.1375276875659; Wed, 31 Jul 2013 06:21:15 -0700 (PDT) Received: from [127.0.1.1] (85.136.70.56.dyn.user.ono.com. [85.136.70.56]) by mx.google.com with ESMTPSA id z2sm2331884wiv.11.2013.07.31.06.21.13 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 06:21:15 -0700 (PDT) Subject: [libnftables PATCH 4/7] chain: remove the properties node in Json output To: netfilter-devel@vger.kernel.org From: Alvaro Neira Cc: eric@regit.org Date: Wed, 31 Jul 2013 15:21:12 +0200 Message-ID: <20130731132112.29730.21871.stgit@Ph0enix> In-Reply-To: <20130731132051.29730.53717.stgit@Ph0enix> References: <20130731132051.29730.53717.stgit@Ph0enix> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Álvaro Neira Ayuso I have removed the properties node from chain because it's a node without relevant information Signed-off-by: Alvaro Neira Ayuso --- src/chain.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/chain.c b/src/chain.c index 621794c..7e2567b 100644 --- a/src/chain.c +++ b/src/chain.c @@ -669,10 +669,9 @@ static int nft_chain_snprintf_json(char *buf, size_t size, struct nft_chain *c) "\"handle\": %"PRIu64"," "\"bytes\": %"PRIu64"," "\"packets\": %"PRIu64"," - "\"properties\": {" - "\"family\": \"%s\"," - "\"table\": \"%s\"," - "\"use\": %d", + "\"family\": \"%s\"," + "\"table\": \"%s\"," + "\"use\": %d", c->name, c->handle, c->bytes, c->packets, nft_family2str(c->family), c->table, c->use); @@ -690,7 +689,6 @@ static int nft_chain_snprintf_json(char *buf, size_t size, struct nft_chain *c) } ret = snprintf(buf+offset, size, - "}" "}" "}"); SNPRINTF_BUFFER_SIZE(ret, size, len, offset);