From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: libc-stable@sourceware.org
Cc: Andreas Schwab <schwab@suse.de>
Subject: [PATCH 1/3] iconv: restore verbosity with unrecognized encoding names (bug 30694)
Date: Sat, 16 Sep 2023 00:01:27 +0200 [thread overview]
Message-ID: <20230915220242.2825510-2-dilfridge@gentoo.org> (raw)
In-Reply-To: <20230915220242.2825510-1-dilfridge@gentoo.org>
From: Andreas Schwab <schwab@suse.de>
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)
---
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
--
2.41.0
next prev parent reply other threads:[~2023-09-15 22:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 22:01 [COMMITTED 2.38] A few small backports Andreas K. Hüttel
2023-09-15 22:01 ` Andreas K. Hüttel [this message]
2023-09-15 22:01 ` [PATCH 2/3] string: Fix tester build with fortify enable with gcc < 12 Andreas K. Hüttel
2023-09-15 22:01 ` [PATCH 3/3] manual/jobs.texi: Add missing @item EPERM for getpgid Andreas K. Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230915220242.2825510-2-dilfridge@gentoo.org \
--to=dilfridge@gentoo.org \
--cc=libc-stable@sourceware.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).