![]() |
|
| << Previous | Next >> | |
| | |
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- thereserveblocksparameter 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
| Dynamic C Functions | << Previous | Next >> | rabbit.com |