correct TStatFs for netbsd

git-svn-id: trunk@20904 -
This commit is contained in:
pierre 2012-04-17 15:25:29 +00:00
parent e3aabfec79
commit 8750b10113

View File

@ -96,16 +96,40 @@ type
pSocklen = ^socklen_t; pSocklen = ^socklen_t;
Const Const
{$warning Check me, I'am from FreeBSD} MNAMELEN = 90; // found in sys/mount.h
MNAMLEN = 80; // slightly machine specific. MNAMLEN = MNAMELEN; // Keep all constant name.
MFSNamLen = 16; MFSNAMELEN = 16;// found in sys/compat/sys/mount.h
MFSNamLen = MFSNAMELEN;
type type
{$warning Check me, I'am from FreeBSD} { Checked, found in sys/fstypes.h }
fsid_t = array[0..1] of cint; fsid_t = array[0..1] of cint32;
// Kernel statfs // Kernel statfs
{$warning Check me, I'am from FreeBSD} { Checked, in sys/compat/sys/mount.h header }
TStatfs = packed record (*
spare2, { place holder} struct statfs12 {
short f_type; /* type of file system */
u_short f_oflags; /* deprecated copy of mount flags */
long f_bsize; /* fundamental file system block size */
long f_iosize; /* optimal transfer block size */
long f_blocks; /* total data blocks in file system */
long f_bfree; /* free blocks in fs */
long f_bavail; /* free blocks avail to non-superuser */
long f_files; /* total file nodes in file system */
long f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
uid_t f_owner; /* user that mounted the file system */
long f_flags; /* copy of mount flags */
long f_syncwrites; /* count of sync writes since mount */
long f_asyncwrites; /* count of async writes since mount */
long f_spare[1]; /* spare for later */
char f_fstypename[MFSNAMELEN]; /* fs type name */
char f_mntonname[MNAMELEN]; /* directory on which mounted */
char f_mntfromname[MNAMELEN]; /* mounted file system */
};
*)
TStatfs12 = record
f_type : shortint;
f_oflags : word;
bsize, { fundamental block size} bsize, { fundamental block size}
iosize, { optimal block size } iosize, { optimal block size }
blocks, { total blocks} blocks, { total blocks}
@ -115,19 +139,15 @@ type
ffree : clong ; { file nodes free} ffree : clong ; { file nodes free}
fsid : fsid_t; fsid : fsid_t;
fowner : tuid; {mounter uid} fowner : tuid; {mounter uid}
ftype : cint; fflags : clong; {copy of mount flags}
fflags : cint; {copy of mount flags}
fsyncwrites, fsyncwrites,
fasyncwrites : clong; fasyncwrites : clong;
fspare0 : array [0..0] of clong;
fstypename : array[0..MFSNamLen-1] of char; fstypename : array[0..MFSNamLen-1] of char;
mountpoint : array[0..MNAMLEN-1] of char; mountpoint : array[0..MNAMLEN-1] of char;
fsyncreads, { count of sync reads since mount }
fasyncreads : clong;
fspares1 : cshort;
mnfromname : array[0..MNAMLEN-1] of char; mnfromname : array[0..MNAMLEN-1] of char;
fspares2 : cshort;
fspare3 : array[0..1] of clong;
end; end;
TStatFS = TStatFS12;
PStatFS=^TStatFS; PStatFS=^TStatFS;
timeval = packed record timeval = packed record
tv_sec, tv_sec,