06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

fstat_vfs pHILE+ <strong>System</strong> <strong>Calls</strong><br />

Return Value<br />

buf Points to a statvfs structure defined in , as follows:<br />

typedef struct {<br />

long val[2];<br />

} fsid_t;<br />

struct statvfs {<br />

unsigned long f_bsize; /* preferred volume block size */<br />

unsigned long f_frsize; /* fundamental volume block size */<br />

unsigned long f_blocks; /* total number of blocks */<br />

unsigned long f_bfree; /* total number of free blocks */<br />

unsigned long f_bavail; /* free blocks available to<br />

* non-superuser */<br />

unsigned long f_files; /* total # of file nodes<br />

* (pHILE+ files only) */<br />

unsigned long f_ffree; /* reserved (not supported) */<br />

unsigned long f_favail; /* reserved (not supported) */<br />

fsid_t f_fsid; /* reserved (not supported) */<br />

char f_basetype[16]; /* reserved (not supported) */<br />

unsigned long f_flag; /* reserved (not supported) */<br />

unsigned long f_namemax; /* reserved (not supported) */<br />

char f_fstr[32]; /* reserved (not supported) */<br />

unsigned long f_fstype; /* file system type number */<br />

unsigned long f_filler[15];/* reserved (not supported) */<br />

};<br />

This structure cannot be packed. Currently, the fields f_ffree,<br />

f_favail, f_fsid, f_basetype, f_flag, f_namemax, f_fstr and<br />

f_filler are reserved and do not have values. For all volumes except<br />

pHILE+ format, the field f_files is unused.<br />

The field f_fstype identifies the type of file system format. The values<br />

in are given below:<br />

FSTYPE_PHILE pHILE+ format volume<br />

FSTYPE_PCDOS MS-DOS format volume<br />

FSTYPE_CDROM CD-ROM format volume<br />

FSTYPE_NFS Client NFS volume<br />

The return value for all unsupported fields is 0.<br />

This system call returns 0 on success or an error code on failure.<br />

2-40 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!