From 80077787f8f21da1efd8dc27a4c5767ab47a1df6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 9 Oct 2018 00:03:28 +0200 Subject: src: remove json support We have better json support in libnftables these days. Signed-off-by: Pablo Neira Ayuso --- examples/nft-obj-get.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'examples/nft-obj-get.c') diff --git a/examples/nft-obj-get.c b/examples/nft-obj-get.c index bec33b6..e6a19fe 100644 --- a/examples/nft-obj-get.c +++ b/examples/nft-obj-get.c @@ -57,8 +57,7 @@ int main(int argc, char *argv[]) uint32_t type = NFTNL_OUTPUT_DEFAULT; if (argc < 2 || argc > 5) { - fprintf(stderr, "%s [] []\n", - argv[0]); + fprintf(stderr, "%s
[]\n", argv[0]); return EXIT_FAILURE; } @@ -77,18 +76,6 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (strcmp(argv[argc-1], "xml") == 0) { - type = NFTNL_OUTPUT_XML; - argv[argc-1] = NULL; - argc--; - }else if (strcmp(argv[argc-1], "json") == 0) { - type = NFTNL_OUTPUT_JSON; - argv[argc-1] = NULL; - argc--; - } else if (strcmp(argv[argc - 1], "default") == 0) { - argc--; - } - if (argc == 3 || argc == 4) { t = nftnl_obj_alloc(); if (t == NULL) { -- cgit v1.2.3