From 989b793a3bf689757b2b8f08a1c264743d75fa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Neira=20Ayuso?= Date: Mon, 11 Nov 2013 21:09:35 +0100 Subject: src: unify parse and output types Unify parse and output types that are redundant to all existing nftables objects. Thus, all NFT_*_O_[XML|JSON|DEFAULT] are merged into NFT_OUTPUT_[JSON|XML] and NFT_PARSE_[JSON|XML]. Signed-off-by: Alvaro Neira Ayuso Signed-off-by: Pablo Neira Ayuso --- examples/nft-rule-json-add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/nft-rule-json-add.c') diff --git a/examples/nft-rule-json-add.c b/examples/nft-rule-json-add.c index 83dec3e..8659081 100644 --- a/examples/nft-rule-json-add.c +++ b/examples/nft-rule-json-add.c @@ -63,12 +63,12 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (nft_rule_parse(r, NFT_RULE_PARSE_JSON, json) < 0) { + if (nft_rule_parse(r, NFT_PARSE_JSON, json) < 0) { printf("E: Unable to parse JSON file: %s\n", strerror(errno)); exit(EXIT_FAILURE); } - nft_rule_snprintf(reprint, sizeof(reprint), r, NFT_RULE_O_JSON, 0); + nft_rule_snprintf(reprint, sizeof(reprint), r, NFT_OUTPUT_JSON, 0); printf("Parsed:\n%s\n", reprint); nft_rule_attr_unset(r, NFT_RULE_ATTR_HANDLE); -- cgit v1.2.3