Re: statfs.2: f_spare[4] or f_spare[5]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01 Nov 2014 13:00, Jan Chaloupka wrote:
> On 11/01/2014 04:56 AM, Mike Frysinger wrote:
> > On 31 Oct 2014 22:26, Jan Chaloupka wrote:
> >> there is probably a wrong number in description of statfs structure. In
> >> description section, struct statfs contains as a last field f_spare[5].
> >> But the /usr/include/bits/statfs.h itself contains f_spare[4]
> >> (glibc-headers-2.18 on f20).
> >>
> >> Looking into glibc-2.20, there is f_spare[6]. Looks like the structure
> >> is gradually evolving :).
> >>
> >> Inspecting upstream history (gitk statfs.h), it shows it was f_spare[6]
> >> since 1997.
> > i wonder if we should strip f_spare from the man page.  it's not really useful.
> 
> I would prefer to keep f_spare.

why ?  it serves no useful purpose, and people should be including the header to 
get the definition.  the man page is there to describe the fields that actually 
get used.

> As Siddhesh wrote, statfs.h is architecture/OS dependent in general. In 
> a case of fedora (f20, f22) armv7hl, x86_64 and i686 has f_spare[4].
> 
> We could add a sentence right under struct statfs:
> "Depending on your architecture or OS, length of f_spare of statfs 
> struct can vary."

this man page is Linux specific

> > the __SWORD_TYPE should probably be replaced with __fsword_t, and drop the
> > __WORDSIZE logic.  that gets ugly with syscall ABIs.
> 
>   I am not sure if __SWORD_TYPE is no longer valid type and is replace 
> by __fsword_t everywhere (all architectures and OS).

the latest headers use __fsword_t
-mike

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux