]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
test: report compilation without support
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Thu, 31 Oct 2013 12:36:44 +0000 (13:36 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 3 Nov 2013 21:29:21 +0000 (22:29 +0100)
Print a message when there is no support for some parser.

Remove those EOPNOTSUPPs because they are unused.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/nft-parsing-test.c

index 8f0123399298f125b4fe624edb628abd38626b48..e2931a6b2d9c5f54d16fb6ea093957de5f510fb9 100644 (file)
@@ -251,7 +251,7 @@ failparsing:
        json_decref(root);
        return -1;
 #else
-       errno = EOPNOTSUPP;
+       printf("Compiled without support for JSON.\n");
        return -1;
 #endif
 }
@@ -350,7 +350,7 @@ failparsing:
        printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
        return -1;
 #else
-       errno = EOPNOTSUPP;
+       printf("Compiled without support for XML.\n");
        return -1;
 #endif
 }