#include <bm_zms.h>
Read an entry from the file system.
- Parameters
-
| fs | Pointer to the file system. |
| id | ID of the entry to be read. |
| data | Pointer to data buffer. |
| len | Number of bytes to read at most. |
- Returns
- Number of bytes read. On success, it will be equal to the number of bytes requested to be read or less than that if the stored data has a smaller size than the requested one. On error, returns negative value of error codes defined in
errno.h.
- Return values
-
| Number | of bytes read (> 0) on success. |
| -EFAULT | if fs is NULL. |
| -EACCES | if BM_ZMS is still not initialized. |
| -EIO | if there is a memory read/write error. |
| -ENOENT | if there is no entry with the given id. |