From 52f169d3938492e42112e0412e17780db7949227 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Mon, 15 Sep 2014 14:10:45 +0200 Subject: netlink: include file and line in netlink ABI errors Let's give some more information when netlink ABI errors happens. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/netlink.c') diff --git a/src/netlink.c b/src/netlink.c index 7d3e71ff..84d5db3c 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -80,10 +80,11 @@ static void netlink_open_mon_sock(void) nf_mon_sock = nfsock_open(); } -void __noreturn netlink_abi_error(void) +void __noreturn __netlink_abi_error(const char *file, int line, + const char *reason) { fprintf(stderr, "E: Contact urgently your Linux kernel vendor. " - "Netlink ABI is broken: %s\n", strerror(errno)); + "Netlink ABI is broken: %s:%d %s\n", file, line, reason); exit(NFT_EXIT_FAILURE); } -- cgit v1.2.3