On Wed, Aug 26, 2015 at 10:13:14PM +0200, Martijn van Duren wrote:
> Hello tech@,
> 
> When reading cd.4 and comparing it to sys/cdio.h I see that
> CDIOREADTOCENTRYS is an alias to CDIOREADTOCENTRIES, while cd.4 still points
> to CDIOREADTOCENTRYS.
> 
> Both definitions are used in tree:
> $ grep -R CDIOREADTOCENTRIES /usr/src/{{,usr.}{s,}bin,sys}
> /usr/src/sbin/mount_udf/mount_udf.c:    error = ioctl(fd,
> CDIOREADTOCENTRIES, &t);
> /usr/src/sys/sys/cdio.h:#define CDIOREADTOCENTRIES _IOWR('c', 5, struct
> ioc_read_toc_entry)
> /usr/src/sys/sys/cdio.h:#define CDIOREADTOCENTRYS CDIOREADTOCENTRIES
> $ grep -R CDIOREADTOCENTRYS /usr/src/{{,usr.}{s,}bin,sys}
> /usr/src/usr.bin/cdio/cdio.c:   return (ioctl(fd, CDIOREADTOCENTRYS, (char
> *) &t));
> /usr/src/usr.bin/cdio/cdio.c:            * host order like CDIOREADTOCENTRYS
> does.
> /usr/src/sys/compat/linux/linux_cdrom.c:                error =
> (*fp->f_ops->fo_ioctl)(fp, CDIOREADTOCENTRYS,
> /usr/src/sys/scsi/cd.c: case CDIOREADTOCENTRYS: {
> /usr/src/sys/sys/cdio.h:#define CDIOREADTOCENTRYS CDIOREADTOCENTRIES
> 
> Would it make sense to point people to the proper spelling instead of
> pointing out that the spelling is wrong?
> 
> Sincerely,
> 
> Martijn van Duren

hi! i've just committed your fix, thanks. the background, for anyone
interested:

- CDIOREADTOCENTRIES got added as an equivalent to the misspelled
  CDIOTOCREADENTRYS in revision 1.7 of cdio.h (16 years ago). the commit
  log is not helpful though.

- CDIOTOREADENTRYS became an alias (if i can talk about C defines in
  that way) to CDIOREADTOCENTRIES in revision 1.12 (12 years ago)

so your proposal seems reasonable ;)

jmc

> Index: cd.4
> ===================================================================
> RCS file: /cvs/src/share/man/man4/cd.4,v
> retrieving revision 1.24
> diff -u -p -r1.24 cd.4
> --- cd.4      2 Jul 2014 22:35:42 -0000       1.24
> +++ cd.4      26 Aug 2015 20:03:44 -0000
> @@ -212,9 +212,8 @@ struct ioc_toc_header {
>       u_char  ending_track;
>  };
>  .Ed
> -.It Dv CDIOREADTOCENTRYS Fa "struct ioc_read_toc_entry *"
> +.It Dv CDIOREADTOCENTRIES Fa "struct ioc_read_toc_entry *"
>  Return information from the table of contents entries mentioned.
> -(Yes, this command name is misspelled.)
>  The argument structure is defined as follows:
>  .Bd -literal -offset indent
>  struct ioc_read_toc_entry {

Reply via email to