Re: [PATCH] statfs64 no longer missing

Andreas Dilger (adilger@clusterfs.com)
Fri, 18 Oct 2002 00:17:01 -0600


On Oct 18, 2002 10:19 +1000, Peter Chubb wrote:
> -int fat_statfs(struct super_block *sb,struct statfs *buf)
> +int fat_statfs(struct super_block *sb, struct kstatfs *buf)
> {
> int free,nr;
>
> if (MSDOS_SB(sb)->cvf_format &&
> MSDOS_SB(sb)->cvf_format->cvf_statfs)
> return MSDOS_SB(sb)->cvf_format->cvf_statfs(sb,buf,
> - sizeof(struct statfs));
> + sizeof(struct kstatfs));

How about
return MSDOS_SB(sb)->cvf_format->cvf_statfs(sb, buf,
sizeof(*buf));
> +struct statfs64 {
> + long f_type;
> + long f_bsize;
> + long long f_blocks;
> + long long f_bfree;
> + long long f_bavail;
> + long long f_files;
> + long long f_ffree;
> + __kernel_fsid_t f_fsid;
> + long f_namelen;
> + long f_frsize;
> + long f_spare[5];
> };

Wasn't Dave Miller just saying that passing "long" between user-space
and the kernel is just a bad idea? Should we use "__u32" and "__u64"
here instead?

Cheers, Andreas

--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/