[PATCH 1/5] manual: Update to mention ENODEV for ttyname and ttyname_r
Luke Shumaker
lukeshu@lukeshu.com
Fri Oct 13 00:33:00 GMT 2017
On Thu, 12 Oct 2017 14:44:22 -0400,
Dmitry V. Levin wrote:
> > --- a/ChangeLog
> > +++ b/ChangeLog
> > @@ -1,3 +1,7 @@
> > +2017-10-11 Luke Shumaker <lukeshu@parabola.nu>
> > +
> > + * manual/terminal.texi: Mention ENODEV for ttyname and ttyname_r.
>
> I think this should be
>
> * manual/terminal.texi (Is It a Terminal): ...
Sure.
On that note, am I otherwise doing the ChangeLog thing correctly? One
of the wiki pages suggested that the ChangeLog entry should be part of
the commit messages, not part of the patch; looking through the
archives, both ways seem common.
> > --- a/manual/terminal.texi
> > +++ b/manual/terminal.texi
> > @@ -109,6 +109,11 @@ The @var{filedes} is not associated with a terminal.
> > @item ERANGE
> > The buffer length @var{len} is too small to store the string to be
> > returned.
> > +
> > +@item ENODEV
> > +The @var{filedes} is valid, and is associated with a terminal, and
> > +that terminal is a slave psuedo-terminal, but the associated file name
> > +could not be determined. This is a GNU extension.
>
> Something has to be done with the wording, e.g.
>
> The @var{filedes} argument is a valid file descriptor associated with
> a slave psuedo-terminal device, but the file name of that device could
> not be determined. This is a GNU extension.
The wording is awkward, but the exact case of what ENODEV means is
awkward. The problem I have with your wording is that it isn't as
immediately clear that "slave pseudo-terminal" is a special case of
"terminal", and that ENODEV does *not* apply to that more general
case.
Now, IMO, ENODEV probably *should* apply to the more general case of
"The @var{filedes} associated with a terminal device, but the file
name associated with that device could not be determined", but that's
not what it currently means, and it's beyond the scope of this
patchset to change that.
What about:
The @var{filedes} is associated with a terminal device that is a slave
pseudo-terminal, but the file name associated with that device could
not be determined. This is a GNU extension.
--
Happy hacking,
~ Luke Shumaker
More information about the Libc-alpha
mailing list