]> sourceware.org Git - glibc.git/commitdiff
localedef: improve error message [BZ #16985]
authorMike Frysinger <vapier@gentoo.org>
Sat, 29 Aug 2015 20:37:29 +0000 (16:37 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 12 Sep 2015 03:25:06 +0000 (23:25 -0400)
If you pass in a path that fails to be opened, then output_path is set to
NULL, and an error is flagged.  Then at the end, we use both of those:
cannot write output files to `(null)': No such file or directory

Tweak the message to use the user's input when output_path is NULL.

ChangeLog
NEWS
locale/programs/localedef.c

index ae714e0a878ab362fb23cb9cc346460ba52d84ce..5b6550a0b0477718686f146400986ed36d3a3812 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-11  Mike Frysinger  <vapier@gentoo.org>
+
+       [BZ #16985]
+       * programs/localedef.c (main): Display argv[remaining] when
+       output_path is NULL.
+
 2015-09-11  Joseph Myers  <joseph@codesourcery.com>
 
        * math/auto-libm-test-in: Add more tests of acos, acosh, asin,
diff --git a/NEWS b/NEWS
index 8b8a0b4c958a1cae5bfb36824d613abc9cf294a7..cf7fd5f211453cd4b95b844636facbbf1c5bedde 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,10 +10,10 @@ Version 2.23
 * The following bugs are resolved with this release:
 
   2542, 2543, 2558, 2898, 14341, 14912, 15786, 16141, 16517, 16519, 16520,
-  16734, 16973, 17787, 17905, 18084, 18086, 18240, 18265, 18370, 18421,
-  18480, 18525, 18610, 18618, 18647, 18661, 18674, 18675, 18681, 18757,
-  18778, 18781, 18787, 18789, 18790, 18795, 18796, 18820, 18823, 18824,
-  18863, 18870, 18873, 18887, 18921, 18952.
+  16734, 16973, 16985, 17787, 17905, 18084, 18086, 18240, 18265, 18370,
+  18421, 18480, 18525, 18610, 18618, 18647, 18661, 18674, 18675, 18681,
+  18757, 18778, 18781, 18787, 18789, 18790, 18795, 18796, 18820, 18823,
+  18824, 18863, 18870, 18873, 18887, 18921, 18952.
 
 * The obsolete header <regexp.h> has been removed.  Programs that require
   this header must be updated to use <regex.h> instead.
index 2a0f2aa70974daf81bb19d6ead2a248f11549c51..06fca12094125297ae3211f8e27db75550a53982 100644 (file)
@@ -286,7 +286,7 @@ cannot open locale definition file `%s'"), runp->name));
     {
       if (cannot_write_why != 0)
        WITH_CUR_LOCALE (error (4, cannot_write_why, _("\
-cannot write output files to `%s'"), output_path));
+cannot write output files to `%s'"), output_path ? : argv[remaining]));
       else
        write_all_categories (locales, charmap, argv[remaining], output_path);
     }
This page took 0.102447 seconds and 5 git commands to generate.