Download PDF Version

Transcript
fs_format (FS2)
int fs_format( long reserveblocks, int num_blocks, unsigned
wearlevel )
DESCRIPTION
Format all extents of the file system. This must be called after calling fs_init(). Only
extents that are not defined as reserved are formatted. All files are deleted.
PARAMETERS
reserveblocks
Must be zero. Retained for backward compatibility.
num_blocks
Ignored (backward compatibility).
wearlevel
Initial wearlevel value. This should be 1 if you have a new flash,
and some larger number if the flash is used. If you are reformatting a flash, you can use 0 to use the old flash wear levels.
RETURN VALUE
0: Success.
!0: Failure.
ERRNO VALUES
EINVAL - the reserveblocks parameter was non-zero.
EBUSY - one or more files were open.
EIO - I/O error during format. If this occurs, retry the format operation If it fails again,
there is probably a hardware error.
SEE ALSO
fs_init (FS2), lx_format
90
Dynamic C Function Reference Manual