nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ bm_zms_calc_free_space()

ssize_t bm_zms_calc_free_space ( struct bm_zms_fs * fs)

#include <bm_zms.h>

Calculate the available free space in the file system.

Parameters
fsPointer to the file system.
Returns
Number of free bytes. On success, it will be equal to the number of bytes that can still be written to the file system. Calculating the free space is a time-consuming operation, especially on SPI flash. On error, returns negative value of error codes defined in errno.h.
Return values
Numberof free bytes (>= 0) on success.
-EFAULTif fs is NULL.
-EACCESif BM_ZMS is still not initialized.
-EIOif there is a memory read/write error.