diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-08-29 16:37:29 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-09-11 23:25:06 -0400 |
commit | b482d0364ed55c171708cd95922a896f002b6043 (patch) | |
tree | ee1bc11e0ec6e816671c233c570082e90d979685 | |
parent | a1f99ba28b7b2ed4370b81820f47384d9dae4e36 (diff) | |
download | glibc-b482d0364ed55c171708cd95922a896f002b6043.tar.gz glibc-b482d0364ed55c171708cd95922a896f002b6043.tar.xz glibc-b482d0364ed55c171708cd95922a896f002b6043.zip |
localedef: improve error message [BZ #16985]
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | locale/programs/localedef.c | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index ae714e0a87..5b6550a0b0 100644 --- 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 8b8a0b4c95..cf7fd5f211 100644 --- 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. diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 2a0f2aa709..06fca12094 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -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); } |