From c1c3bc8c146b9f395790164a9b4aabebc9f5ab25 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 6 Nov 2015 09:41:11 +0100 Subject: lookup: Adjust error message on failed open Print the strerror() and rephrase the message a bit. Signed-off-by: Tobias Klauser --- lookup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lookup.c b/lookup.c index 7533bae..874a9b1 100644 --- a/lookup.c +++ b/lookup.c @@ -5,6 +5,7 @@ * Subject to the GPL, version 2. */ +#include #include #include "hash.h" @@ -40,7 +41,9 @@ void lookup_init_ports(enum ports which) fp = fopen(file, "r"); if (!fp) { - fprintf(stderr, "No %s found for ports resolving!\n", file); + fprintf(stderr, "Cannot open %s: %s." + "Port name resolution won't be available.\n", + file, strerror(errno)); return; } -- cgit v1.2.3-54-g00ecf