osPfsFreeBlocks.3p 1.56 KB
.TH osPfsFreeBlocks 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osPfsFreeBlocks, osPfsNumFiles \- Summarize CONTROLLER PAK usage
.SH SYNOPSIS
.nf
\f3
.Op c
#include <ultra64.h>
.sp .8v
s32 osPfsFreeBlocks(OSPfs \(**pfs, s32 \(**bytes_not_used);
.sp .8v
s32 osPfsNumFiles(OSPfs \(**pfs, s32 \(**max_files, s32 \(**files_used);
.Op
\f1
.fi
.SH DESCRIPTION
.sp
.sp
The 
.I osPfsFreeBlocks
function returns the size of free space contained in the given CONTROLLER PAK 
back to
.I bytes_not_used.
.sp
The 
.I osPfsNumFiles
function returns the maximum file number limit of the given
.I pfs
back to 
.I max_files.
It also returns the number of existing files back to
.I files_used. 
.sp
A value of 0 is returned if the calls succeed, otherwise
one of the following error code is returned.
.PP
.nf
.ta 5 26 
	PFS_ERR_CONTRFAIL	The controller sends data at higher data
			transfer rate than the hardware handling 
			capability or the hardware CRC error
			occurs.
.sp
	PFS_ERR_INVALID		Invalid parameter or the specified file
			does not exist.  Application should change 
			parameter and then retry.
.sp
	PFS_ERR_NEW_PACK	CONTROLLER PAK has been changed to a
 			different one. Application needs to call 
			osPfsInit(3p) to initialize the new
			CONTROLLER PAK.
.sp
	PFS_ERR_INCONSISTENT	File system is corrupted. Application needs
			to call osPfsChecker(3P) to repair the file 
			system.

.fi
.SH "SEE ALSO"
osContInit (3P),
osPfsAllocateFile (3P),
osPfsChecker (3P),
osPfsFileState (3P),
osPfsInit (3P),
osPfsIsPlug (3P),
osPfsReSizeFile (3P),
osPfsReadWriteFile (3P),
osPfsSetLabel (3P)