Add the use of system errors (nft_parse_perror) in test_xml to know which
node is not found.
Example:
parsing xmlfiles/75-ruleset.xml: FAILED (Invalid argument)
Reason : Node "flags" not found
[ I have mangled this patch to rename this the current 'fail' message
to 'Reason' --pablo ]
Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
fclose(fp);
printf("parsing %s: ", filename);
printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
- nft_parse_perror("fail", err);
+ nft_parse_perror("Reason", err);
return -1;
}
fclose(fp);
printf("parsing %s: ", filename);
printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
+ nft_parse_perror("Reason", err);
return -1;
}