From: "Érico Nogueira" <ericonr@disroot.org>
To: "Adhemerval Zanella" <adhemerval.zanella@linaro.org>,
<libc-alpha@sourceware.org>
Subject: Re: [PATCH 3/3] linux: implement ttyname as a wrapper around ttyname_r.
Date: Fri, 07 May 2021 16:20:57 -0300 [thread overview]
Message-ID: <CB799OPOJR5S.MQVZB15QMFOJ@mussels> (raw)
In-Reply-To: <53bc2e47-4845-d762-1a76-c7f1e7437941@linaro.org>
On Fri May 7, 2021 at 2:21 PM -03, Adhemerval Zanella wrote:
>
>
> On 04/05/2021 13:43, Adhemerval Zanella wrote:
> >
> >
> > On 04/05/2021 13:37, Adhemerval Zanella wrote:
> >>> -
> >>> - if (!name && dostat != -1)
> >>> + int result = ttyname_r (fd, ttyname_buf, TTYNAME_BUFLEN);
> >>> + if (result != 0)
> >>
> >> Why do you need to pass the allocated buffer size minus 1? The ttyname_r
> >> should handle it, it already pass buflen - 1 on readlink for instance.
> >
> > You also need a libc_hidden_{proto,def} ttyname_r to avoid the intra
> > PLT (the elf/check-localplt should have warned you about it).
> >
>
> I fixed my previous noted issues along with this one and push it
> upstream, thanks for the patch.
Ah, great! I hadn't gotten to this yet, thanks a lot for the help and
reviews :)
next prev parent reply other threads:[~2021-05-07 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 1:51 [PATCH 1/3] misc: use _fitoa_word to implement __fd_to_filename Érico Nogueira
2021-05-04 1:51 ` [PATCH 2/3] linux: use fd_to_filename instead of _fitoa_word in ttyname_r Érico Nogueira
2021-05-04 13:18 ` Adhemerval Zanella
2021-05-04 1:51 ` [PATCH 3/3] linux: implement ttyname as a wrapper around ttyname_r Érico Nogueira
2021-05-04 16:37 ` Adhemerval Zanella
2021-05-04 16:43 ` Adhemerval Zanella
2021-05-07 17:21 ` Adhemerval Zanella
2021-05-07 19:20 ` Érico Nogueira [this message]
2021-05-04 13:18 ` [PATCH 1/3] misc: use _fitoa_word to implement __fd_to_filename Adhemerval Zanella
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=CB799OPOJR5S.MQVZB15QMFOJ@mussels \
--to=ericonr@disroot.org \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/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).