From 71c35df2454b1d73f5d762bed56c725578f9f867 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 9 Oct 2014 22:48:27 +0200 Subject: build: allow disabling libreadline-support This makes nftables a bit more embedded-friendly. Signed-off-by: Steven Barth Signed-off-by: Pablo Neira Ayuso --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 2685b0db..3607bd58 100644 --- a/src/main.c +++ b/src/main.c @@ -335,7 +335,11 @@ int main(int argc, char * const *argv) if (scanner_read_file(scanner, filename, &internal_location) < 0) goto out; } else if (interactive) { - cli_init(&state); + if (cli_init(&state) < 0) { + fprintf(stderr, "%s: interactive CLI not supported in this build\n", + argv[0]); + exit(NFT_EXIT_FAILURE); + } return 0; } else { fprintf(stderr, "%s: no command specified\n", argv[0]); -- cgit v1.2.3