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-set-json-add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/nft-set-json-add.c') diff --git a/examples/nft-set-json-add.c b/examples/nft-set-json-add.c index 33c3acd..9a4aa48 100644 --- a/examples/nft-set-json-add.c +++ b/examples/nft-set-json-add.c @@ -64,12 +64,12 @@ int main(int argc, char *argv[]) close(fd); - if (nft_set_parse(s, NFT_SET_PARSE_JSON, json) < 0) { + if (nft_set_parse(s, NFT_PARSE_JSON, json) < 0) { printf("E: Unable to parse JSON file: %s\n", strerror(errno)); exit(EXIT_FAILURE); } - nft_set_snprintf(reprint, sizeof(reprint), s, NFT_SET_O_JSON, 0); + nft_set_snprintf(reprint, sizeof(reprint), s, NFT_OUTPUT_JSON, 0); printf("Parsed:\n%s\n", reprint); family = nft_set_attr_get_u32(s, NFT_SET_ATTR_FAMILY); -- cgit v1.2.3