diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-11-06 09:41:11 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-06 09:41:11 +0100 |
commit | c1c3bc8c146b9f395790164a9b4aabebc9f5ab25 (patch) | |
tree | 855855f2491c57a0f2eddfd138d4bdfc7dc2de53 /lookup.c | |
parent | b39b142f6b99074376fad020e65e22e42809b971 (diff) |
lookup: Adjust error message on failed open
Print the strerror() and rephrase the message a bit.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'lookup.c')
-rw-r--r-- | lookup.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -5,6 +5,7 @@ * Subject to the GPL, version 2. */ +#include <errno.h> #include <string.h> #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; } |