mirror of git://sourceware.org/git/glibc.git
iconv: restore verbosity with unrecognized encoding names (bug 30694)
Commit91927b7c76("Rewrite iconv option parsing [BZ #19519]") changed the iconv program to call __gconv_open directly instead of the iconv_open wrapper, but the former does not set errno. Update the caller to interpret the return codes like iconv_open does. (cherry picked from commitfc72b6d7d8)
This commit is contained in:
parent
00ae4f10b5
commit
63250e9c57
|
|
@ -187,7 +187,7 @@ main (int argc, char *argv[])
|
|||
|
||||
if (res != __GCONV_OK)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
if (res == __GCONV_NOCONV || res == __GCONV_NODB)
|
||||
{
|
||||
/* Try to be nice with the user and tell her which of the
|
||||
two encoding names is wrong. This is possible because
|
||||
|
|
|
|||
Loading…
Reference in New Issue