06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

stat_vfs Gets statistics for a named volume.<br />

#include <br />

unsigned long stat_vfs(<br />

char *name, /* file pathname */<br />

struct statvfs *buf /* volume statistics */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

All volume types.<br />

stat_vfs() returns information about a mounted volume.<br />

name Points to a null-terminated pathname of any file within the mounted<br />

volume.<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 />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-109<br />

2

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

Saved successfully!

Ooh no, something went wrong!