linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Florian Weimer <fweimer@redhat.com>,
	Christoph Kalchreuter <christoph@kalchreuter.de>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: Typo in stat(2)
Date: Wed, 30 Sep 2020 21:38:22 +0200	[thread overview]
Message-ID: <060e7ecf-3590-2fcb-9f28-a1534d97ac7b@gmail.com> (raw)
In-Reply-To: <87pn63tpx4.fsf@oldenburg2.str.redhat.com>

On 9/30/20 2:22 PM, Florian Weimer wrote:
> * Christoph Kalchreuter:
> 
>> There are three Letters "e" missing in Section "DESCRIPTION",
>> Subsection "The stat structure":
>>
>> struct timespec st_atim;  /* Time of last access */
>> struct timespec st_mtim;  /* Time of last modification */
>> sruct timespec st_ctim;  /* Time of last status change */
>>
>> should possibly be:
>>
>> struct timespec st_atime;  /* Time of last access */
>> struct timespec st_mtime;  /* Time of last modification */
>> sruct timespec st_ctime;  /* Time of last status change */
> 
> This typo is also present in POSIX, so we cannot change it (like the
> creat function).

Hi Christoph,

Florian was being very deadpan in his humor! The names 
really are correct. In the header files, one can find

[[  # /usr/include/bits/stat.h

    struct timespec st_atim;            /* Time of last access.  */
    struct timespec st_mtim;            /* Time of last modification.  */
    struct timespec st_ctim;            /* Time of last status change.  */
# define st_atime st_atim.tv_sec        /* Backward compatibility.  */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
]]

And struct timespec is defined as

              struct timespec {
                  time_t  tv_sec;  /* Seconds */
                  long    tv_nsec; /* Nanoseconds */
              };


Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2020-09-30 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 12:07 Typo in stat(2) Christoph Kalchreuter
2020-09-30 12:22 ` Florian Weimer
2020-09-30 19:38   ` Michael Kerrisk (man-pages) [this message]
2020-10-01  6:20     ` Christoph Kalchreuter
2020-10-01  9:22       ` Jakub Wilk

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=060e7ecf-3590-2fcb-9f28-a1534d97ac7b@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=christoph@kalchreuter.de \
    --cc=fweimer@redhat.com \
    --cc=linux-man@vger.kernel.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 NNTP newsgroup(s).