From 6b1c11273f048530216d47f88d0adf2b68aec486 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 31 Dec 2016 11:48:44 +0100 Subject: certtool: improved error reporting on file error --- src/certtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/certtool.c b/src/certtool.c index 75bc447879..d964a4a39c 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -1053,7 +1053,7 @@ static void cmd_parser(int argc, char **argv) if (HAVE_OPT(OUTFILE)) { outfile = safe_open_rw(OPT_ARG(OUTFILE), privkey_op); if (outfile == NULL) { - fprintf(stderr, "%s", OPT_ARG(OUTFILE)); + fprintf(stderr, "Cannot open %s for writing\n", OPT_ARG(OUTFILE)); exit(1); } } else @@ -1067,7 +1067,7 @@ static void cmd_parser(int argc, char **argv) infile = fopen(OPT_ARG(INFILE), "rb"); if (infile == NULL) { - fprintf(stderr, "%s", OPT_ARG(INFILE)); + fprintf(stderr, "Cannot open %s for reading\n", OPT_ARG(INFILE)); exit(1); } } else -- cgit v1.2.1