public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.38/master] iconv: restore verbosity with unrecognized encoding names (bug 30694)
@ 2023-09-15 22:03 Andreas K. Huttel
0 siblings, 0 replies; only message in thread
From: Andreas K. Huttel @ 2023-09-15 22:03 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=63250e9c571314b6daa2c949ea0af335ee766751
commit 63250e9c571314b6daa2c949ea0af335ee766751
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Aug 1 17:01:37 2023 +0200
iconv: restore verbosity with unrecognized encoding names (bug 30694)
Commit 91927b7c76 ("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 commit fc72b6d7d818ab2868920af956d1542d03342a4d)
Diff:
---
iconv/iconv_prog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index bee898c63c..cf32cf9b44 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-15 22:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15 22:03 [glibc/release/2.38/master] iconv: restore verbosity with unrecognized encoding names (bug 30694) Andreas K. Huttel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).