From: Ulrich Drepper Date: Mon, 28 Sep 2009 17:35:41 +0000 (-0700) Subject: Fix locale program error handling X-Git-Tag: upstream/2.30~13282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d076f21cdf5f7bb2293498ed22330bb02c0a68d;p=external%2Fglibc.git Fix locale program error handling If an unknown name is passed to locale, report it and fail. --- diff --git a/ChangeLog b/ChangeLog index 25093e4..25c528e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-28 Ulrich Drepper + + * locale/programs/locale-spec.c (locale_special): If nothing matches + fail with an appropriate message. + 2009-09-10 H.J. Lu * configure.in: Exclude binutils 2.X. Support binutils 2.100 diff --git a/locale/programs/locale-spec.c b/locale/programs/locale-spec.c index 6334f4c..63a7a32 100644 --- a/locale/programs/locale-spec.c +++ b/locale/programs/locale-spec.c @@ -1,5 +1,5 @@ /* Handle special requests. - Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -124,4 +124,7 @@ locale_special (const char *name, int show_category_name, return; } #endif + + /* If nothing matches, fail. */ + error (1, 0, gettext ("unknown name \"%s\""), name); }