#include <bm_zms.h>
Read a history 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 be read. |
| cnt | History counter: 0: latest entry, 1: one before latest ... |
- Returns
- Number of bytes read. On success, it will be equal to the number of bytes requested to be read. When the return value is larger than the number of bytes requested to read this indicates not all bytes were read, and more data is available. 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 and history counter. |