linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stat(2)
@ 2015-04-02 16:59 Jonny Grant
       [not found] ` <CAGc9Evd5yJ0jvMbwiQ2e0Obcj01srNxo2G3zUpub+4zfYATjBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jonny Grant @ 2015-04-02 16:59 UTC (permalink / raw)
  To: linux-man, Michael Kerrisk-manpages

Hello

I see:
http://man7.org/linux/man-pages/man3/lseek64.3.html
Grammar feedback, "the glibc", prefix word "the" is not needed.


http://man7.org/linux/man-pages/man2/fstat64.2.html
Has page heading stat(2), and does not contain any information about fstat64()
Any ideas?


I saw this one looks as expected:
http://man7.org/linux/man-pages/man3/lseek64.3.html

I saw this page has similar problem:
http://man7.org/linux/man-pages/man2/stat64.2.html

No mention of stat64()


Regards, Jonny
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stat(2)
       [not found] ` <CAGc9Evd5yJ0jvMbwiQ2e0Obcj01srNxo2G3zUpub+4zfYATjBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-04-11  6:04   ` Michael Kerrisk (man-pages)
       [not found]     ` <55302846.5020506@jguk.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-04-11  6:04 UTC (permalink / raw)
  To: Jonny Grant, linux-man; +Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w

Hello Jonny,

On 04/02/2015 06:59 PM, Jonny Grant wrote:
> Hello
> 
> I see:
> http://man7.org/linux/man-pages/man3/lseek64.3.html
> Grammar feedback, "the glibc", prefix word "the" is not needed.

Fixed. Thanks.

> http://man7.org/linux/man-pages/man2/fstat64.2.html
> Has page heading stat(2), 

The doc for stat/fstat/lstat is combined into a single page...

> and does not contain any information about fstat64()
> Any ideas?

See below.

> I saw this one looks as expected:
> http://man7.org/linux/man-pages/man3/lseek64.3.html

Actually, that page is a bit of an aberration that appeared 
before my time as maintainer.

> I saw this page has similar problem:
> http://man7.org/linux/man-pages/man2/stat64.2.html
> 
> No mention of stat64()

That's not precisely true. See the "C library/kernel ABI differences" at 
http://man7.org/linux/man-pages/man2/stat.2.html#NOTES. Note also
the sentence "Similar remarks apply for fstat() and lstat()."

That said, the details are thin, and I've written  some text to explain
things in a little more detail:

   C library/kernel ABI differences
       Over time, increases in the size of the stat structure  have  led
       to   three   successive  versions  of  stat():  sys_stat()  (slot
       __NR_oldstat), sys_newstat() (slot __NR_stat),  and  sys_stat64()
       (slot  __NR_stat64)  on 32-bit platforms such as i386.  The first
       two versions were already present in Linux 1.0 (albeit with  dif‐
       ferent  names); the last was added in Linux 2.4.  Similar remarks
       apply for fstat() and lstat().

       The kernel-internal versions of the stat structure dealt with  by
       the different versions are, respectively:

              __old_kernel_stat
                     The  original structure, with rather narrow fields,
                     and no padding.

              stat   Larger st_ino field and padding  added  to  various
                     parts  of  the structure to allow for future expan‐
                     sion.

              stat64 Even larger st_ino field, larger st_uid and  st_gid
                     fields  to  accommodate  the Linux-2.4 expansion of
                     UIDs  and  GIDs  to  32  bits,  and  various  other
                     enlarged  fields  and further padding in the struc‐
                     ture.  (Various padding bytes were eventually  con‐
                     sumed  in  Linux  2.6,  with  the  advent of 32-bit
                     device IDs and nanosecond components for the  time‐
                     stamp fields.)

       The glibc stat() wrapper function hides these details from appli‐
       cations, invoking the most recent version of the system call pro‐
       vided  by  the  kernel, and repacking the returned information if
       required for old binaries.

       On modern 64-bit systems, life is  simpler:  there  is  a  single
       stat()  system  call  and  the kernel deals with a stat structure
       that contains fields of a sufficient size.

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: stat(2)
       [not found]       ` <55302846.5020506-hus3n9K41k0@public.gmane.org>
@ 2015-04-30 22:21         ` Jonny Grant
  0 siblings, 0 replies; 3+ messages in thread
From: Jonny Grant @ 2015-04-30 22:21 UTC (permalink / raw)
  To: Michael Kerrisk-manpages, linux-man

> Hello Jonny,
>
> On 04/02/2015 06:59 PM, Jonny Grant wrote:
> > Hello
> >
> > I see:
> > http://man7.org/linux/man-pages/man3/lseek64.3.html
> > Grammar feedback, "the glibc", prefix word "the" is not needed.
>
> Fixed. Thanks.
>
> > http://man7.org/linux/man-pages/man2/fstat64.2.html
> > Has page heading stat(2),
>
> The doc for stat/fstat/lstat is combined into a single page...
>
> > and does not contain any information about fstat64()
> > Any ideas?
>
> See below.
>
> > I saw this one looks as expected:
> > http://man7.org/linux/man-pages/man3/lseek64.3.html
>
> Actually, that page is a bit of an aberration that appeared
> before my time as maintainer.
>
> > I saw this page has similar problem:
> > http://man7.org/linux/man-pages/man2/stat64.2.html
> >
> > No mention of stat64()
>
> That's not precisely true. See the "C library/kernel ABI differences" at
> http://man7.org/linux/man-pages/man2/stat.2.html#NOTES. Note also
> the sentence "Similar remarks apply for fstat() and lstat()."

Ok I understand now. There is no need for a stat64() public
implementation because off_t is 8 bytes, even on 32bit systems.

Many thanks for making the clarifications and updates.
Regards, Jonny
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-30 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 16:59 stat(2) Jonny Grant
     [not found] ` <CAGc9Evd5yJ0jvMbwiQ2e0Obcj01srNxo2G3zUpub+4zfYATjBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-11  6:04   ` stat(2) Michael Kerrisk (man-pages)
     [not found]     ` <55302846.5020506@jguk.org>
     [not found]       ` <55302846.5020506-hus3n9K41k0@public.gmane.org>
2015-04-30 22:21         ` stat(2) Jonny Grant

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).