summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-11-06 09:41:11 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-11-06 09:41:11 +0100
commitc1c3bc8c146b9f395790164a9b4aabebc9f5ab25 (patch)
tree855855f2491c57a0f2eddfd138d4bdfc7dc2de53
parentb39b142f6b99074376fad020e65e22e42809b971 (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>
-rw-r--r--lookup.c5
1 files changed, 4 insertions, 1 deletions
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 <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;
}