From f79d3ab1dee474740ba7ad119fd8a86a73a796bc Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Sat, 20 Oct 2018 22:35:28 +0200 Subject: trafgen: fixed '--in -' to work again with STDIN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has been broken by commit 4e47fd021a6945aa626eaef4446c5b547d8c2a85. Signed-off-by: Jaroslav Škarvada Signed-off-by: Tobias Klauser --- trafgen_parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trafgen_parser.y b/trafgen_parser.y index 7fffdd9..53723dd 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -1513,7 +1513,7 @@ void compile_packets(char *file, bool verbose, unsigned int cpu, char tmp_file[128]; int ret = -1; - if (access(file, R_OK)) { + if (strncmp("-", file, strlen("-")) && access(file, R_OK)) { fprintf(stderr, "Cannot access %s: %s!\n", file, strerror(errno)); die(); } -- cgit v1.2.3-54-g00ecf