From cb49ad2ae4320d74aea2d9e6940055842c4480a9 Mon Sep 17 00:00:00 2001 From: "B. Blechschmidt" Date: Tue, 21 Jan 2025 18:51:27 +0100 Subject: [PATCH] Print detailed error on domain file error --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 44dc42c..0479942 100644 --- a/src/main.c +++ b/src/main.c @@ -2296,7 +2296,7 @@ void run() context.domainfile = fopen(context.cmd_args.domains, "r"); if (context.domainfile == NULL) { - log_msg(LOG_ERROR, "Failed to open domain file \"%s\".\n", context.cmd_args.domains); + log_msg(LOG_ERROR, "Failed to open domain file \"%s\": %s\n", context.cmd_args.domains, strerror(errno)); clean_exit(EXIT_FAILURE); } } @@ -2914,7 +2914,7 @@ void parse_cmd(int argc, char **argv) context.domainfile = fopen(context.cmd_args.domains, "r"); if (context.domainfile == NULL) { - log_msg(LOG_ERROR, "Failed to open domain file \"%s\".\n", argv[i]); + log_msg(LOG_ERROR, "Failed to open domain file \"%s\": %s.\n", argv[i], strerror(errno)); clean_exit(EXIT_FAILURE); } if(fseek(context.domainfile, 0, SEEK_END) != 0)