next up previous contents index
Next: 7.3.2 sync: Synchronize in-core Up: 7.3 oskit_filesystem: File System Previous: 7.3 oskit_filesystem: File System

7.3.1 statfs: Get attributes of this filesystem

 

SYNOPSIS

#include <oskit/fs/filesystem.h>

oskit_error_t oskit_filesystem_statfs(oskit_filesystem_t *f, [out] oskit_statfs_t *out_stats);

DIRECTION

client OS tex2html_wrap_inline32841 filesystem library

DESCRIPTION

This method returns the attributes of this filesystem. out_stats is a pointer to an oskit_statfs_t structure defined as follows:

struct oskit_statfs  {

	    oskit_u32_t bsize;   /* file system block size */
	    oskit_u32_t frsize;  /* fundamental file system block size */
	    oskit_u32_t blocks;  /* total blocks in fs in units of frsize */
	    oskit_u32_t bfree;   /* free blocks in fs */
	    oskit_u32_t bavail;  /* free blocks avail to non-superuser */
	    oskit_u32_t files;   /* total file nodes in file system */
	    oskit_u32_t ffree;   /* free file nodes in fs */
	    oskit_u32_t favail;  /* free file nodes avail to non-superuser */
	    oskit_u32_t fsid;    /* file system id */
	    oskit_u32_t flag;    /* mount flags */	
	    oskit_u32_t namemax; /* max bytes in a file name */
	 
};

PARAMETERS

f
The filesystem whose attributes are desired.
out_stats
The attributes of the specified filesystem.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group