From 632ddb875317c6eb94920d83186352ea3960a254 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 27 Nov 2015 21:27:39 +0000 Subject: [PATCH] kbdmap: include filename when reporting fopen() failure Previously only one of two cases reported the file name. Use the same error string in both cases. Sponsored by: The FreeBSD Foundation --- usr.sbin/kbdmap/kbdmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/kbdmap/kbdmap.c b/usr.sbin/kbdmap/kbdmap.c index 4f983a51825..0670d1b4928 100644 --- a/usr.sbin/kbdmap/kbdmap.c +++ b/usr.sbin/kbdmap/kbdmap.c @@ -692,7 +692,7 @@ menu_read(void) fclose(fp); } else - printf("Could not open file\n"); + fprintf(stderr, "Could not open %s for reading\n", filename); if (show) { qsort(lang_list->sl_str, lang_list->sl_cur, sizeof(char*),