sys_fstatfs  [fs/open.c]


Obtains information about mounted file system. This system call is identical to sys_statfs except it uses a file descriptor to specify the file.

Arguments

eax 100
ebx File descriptor. It can be FD of any file within the mounted file system
ecx Pointer to a statfs structure which will receive the information:
struc statfs
{
.f_type    dd ?
.f_bsize   dd ?
.f_blocks  dd ?
.f_bfree   dd ?
.f_bavail  dd ?
.f_files   dd ?
.f_ffree   dd ?
.f_fsid    dd ?
.f_namelen dd ?
.f_frsize  dd ?
.f_spare   dd 5 dup(?)
}

statfs members:

f_type

Type of file system. It may be on of the following:
ADFS_SUPER_MAGIC    0xadf5
AFFS_SUPER_MAGIC    0xADFF
BEFS_SUPER_MAGIC    0x42465331
BFS_MAGIC           0x1BADFACE
CIFS_MAGIC_NUMBER   0xFF534D42
CODA_SUPER_MAGIC    0x73757245
COH_SUPER_MAGIC     0x012FF7B7
CRAMFS_MAGIC        0x28cd3d45
DEVFS_SUPER_MAGIC   0x1373
EFS_SUPER_MAGIC     0x00414A53
EXT_SUPER_MAGIC     0x137D
EXT2_OLD_SUPER_MAGIC 0xEF51
EXT2_SUPER_MAGIC    0xEF53
EXT3_SUPER_MAGIC    0xEF53
HFS_SUPER_MAGIC     0x4244
HPFS_SUPER_MAGIC    0xF995E849
HUGETLBFS_MAGIC     0x958458f6
ISOFS_SUPER_MAGIC   0x9660
JFFS2_SUPER_MAGIC   0x72b6
JFS_SUPER_MAGIC     0x3153464a
MINIX_SUPER_MAGIC   0x137F
MINIX_SUPER_MAGIC2  0x138F
MINIX2_SUPER_MAGIC  0x2468
MINIX2_SUPER_MAGIC2 0x2478
MSDOS_SUPER_MAGIC   0x4d44
NCP_SUPER_MAGIC     0x564c
NFS_SUPER_MAGIC     0x6969
NTFS_SB_MAGIC       0x5346544e
OPENPROM_SUPER_MAGIC 0x9fa1
PROC_SUPER_MAGIC    0x9fa0
QNX4_SUPER_MAGIC    0x002f
REISERFS_SUPER_MAGIC 0x52654973
ROMFS_MAGIC         0x7275
SMB_SUPER_MAGIC     0x517B
SYSV2_SUPER_MAGIC   0x012FF7B6
SYSV4_SUPER_MAGIC   0x012FF7B5
TMPFS_MAGIC         0x01021994
UDF_SUPER_MAGIC     0x15013346
UFS_MAGIC           0x00011954
USBDEVICE_SUPER_MAGIC 0x9fa2
VXFS_SUPER_MAGIC    0xa501FCF5
XENIX_SUPER_MAGIC   0x012FF7B4
XFS_SUPER_MAGIC     0x58465342
_XIAFS_SUPER_MAGIC  0x012FD16D
f_bsize
Optimal block size.
f_blocks
Optimal transfer block size.
f_bfree
Total data blocks in file system.
f_bavail
Free blocks in file system.
f_files
Total file nodes in file system.
f_ffree
Free file nodes in file system.
f_fsid
File system ID.
f_namelen
Maximum length of filenames.
f_frsize
*to be documened*
f_spare
Reserved for later use.

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EBADF ebx is not a valid, open, file descriptor.
-EOVERFLOW Some values were too large to be represented in the returned struct.
-EIO An I/O error occurred while reading from the file system.

Remarks

n/a

Compatibility

n/a