diff options
author | Álvaro Neira Ayuso <alvaroneay@gmail.com> | 2013-07-31 15:21:06 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-31 16:43:53 +0200 |
commit | 07b93e3008df81306ef4ed65b9c2c860b62caa7d (patch) | |
tree | 82cf22da90b6f534035a7ce1e6926f65412c5dc9 /src | |
parent | 03e3740d654e1e14ccfb8dbfaba605ae72067ef6 (diff) |
table: remove the properties node in Json output
I have removed the properties node from table because
it provides no relevant information.
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/table.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/table.c b/src/table.c index 526f3e7..402e8c1 100644 --- a/src/table.c +++ b/src/table.c @@ -300,12 +300,6 @@ static int nft_table_json_parse(struct nft_table *t, char *json) nft_table_attr_set_str(t, NFT_TABLE_ATTR_NAME, strdup(str)); - root = json_object_get(root, "properties"); - if (root == NULL) { - errno = EINVAL; - goto err; - } - str = nft_jansson_value_parse_str(root, "family"); if (str == NULL) goto err; @@ -360,10 +354,8 @@ static int nft_table_snprintf_json(char *buf, size_t size, struct nft_table *t) return snprintf(buf, size, "{\"table\" : {" "\"name\" : \"%s\"," - "\"properties\" : {" - "\"family\" : \"%s\"," - "\"table_flags\" : %d" - "}" + "\"family\" : \"%s\"," + "\"table_flags\" : %d" "}" "}" , t->name, nft_family2str(t->family), t->table_flags); |