@@ -85,7 +85,7 @@ struct zms_fs {
85
85
* @retval 0 on success.
86
86
* @retval -ENOTSUP if the detected file system is not ZMS.
87
87
* @retval -EPROTONOSUPPORT if the ZMS version is not supported.
88
- * @retval -EINVAL if any of the flash parameters or the sector layout is invalid.
88
+ * @retval -EINVAL if `fs` is NULL or any of the flash parameters or the sector layout is invalid.
89
89
* @retval -ENXIO if there is a device error.
90
90
* @retval -EIO if there is a memory read/write error.
91
91
*/
@@ -101,6 +101,7 @@ int zms_mount(struct zms_fs *fs);
101
101
* @retval -EACCES if `fs` is not mounted.
102
102
* @retval -ENXIO if there is a device error.
103
103
* @retval -EIO if there is a memory read/write error.
104
+ * @retval -EINVAL if `fs` is NULL.
104
105
*/
105
106
int zms_clear (struct zms_fs * fs );
106
107
@@ -124,7 +125,7 @@ int zms_clear(struct zms_fs *fs);
124
125
* @retval -EACCES if ZMS is still not initialized.
125
126
* @retval -ENXIO if there is a device error.
126
127
* @retval -EIO if there is a memory read/write error.
127
- * @retval -EINVAL if `len` is invalid.
128
+ * @retval -EINVAL if `fs` is NULL or ` len` is invalid.
128
129
* @retval -ENOSPC if no space is left on the device.
129
130
*/
130
131
ssize_t zms_write (struct zms_fs * fs , uint32_t id , const void * data , size_t len );
@@ -139,6 +140,7 @@ ssize_t zms_write(struct zms_fs *fs, uint32_t id, const void *data, size_t len);
139
140
* @retval -EACCES if ZMS is still not initialized.
140
141
* @retval -ENXIO if there is a device error.
141
142
* @retval -EIO if there is a memory read/write error.
143
+ * @retval -EINVAL if `fs` is NULL.
142
144
*/
143
145
int zms_delete (struct zms_fs * fs , uint32_t id );
144
146
@@ -157,6 +159,7 @@ int zms_delete(struct zms_fs *fs, uint32_t id);
157
159
* @retval -EACCES if ZMS is still not initialized.
158
160
* @retval -EIO if there is a memory read/write error.
159
161
* @retval -ENOENT if there is no entry with the given `id`.
162
+ * @retval -EINVAL if `fs` is NULL.
160
163
*/
161
164
ssize_t zms_read (struct zms_fs * fs , uint32_t id , void * data , size_t len );
162
165
@@ -177,6 +180,7 @@ ssize_t zms_read(struct zms_fs *fs, uint32_t id, void *data, size_t len);
177
180
* @retval -EACCES if ZMS is still not initialized.
178
181
* @retval -EIO if there is a memory read/write error.
179
182
* @retval -ENOENT if there is no entry with the given `id` and history counter.
183
+ * @retval -EINVAL if `fs` is NULL.
180
184
*/
181
185
ssize_t zms_read_hist (struct zms_fs * fs , uint32_t id , void * data , size_t len , uint32_t cnt );
182
186
@@ -192,6 +196,7 @@ ssize_t zms_read_hist(struct zms_fs *fs, uint32_t id, void *data, size_t len, ui
192
196
* @retval -EACCES if ZMS is still not initialized.
193
197
* @retval -EIO if there is a memory read/write error.
194
198
* @retval -ENOENT if there is no entry with the given id.
199
+ * @retval -EINVAL if `fs` is NULL.
195
200
*/
196
201
ssize_t zms_get_data_length (struct zms_fs * fs , uint32_t id );
197
202
@@ -207,6 +212,7 @@ ssize_t zms_get_data_length(struct zms_fs *fs, uint32_t id);
207
212
* @retval Number of free bytes (>= 0) on success.
208
213
* @retval -EACCES if ZMS is still not initialized.
209
214
* @retval -EIO if there is a memory read/write error.
215
+ * @retval -EINVAL if `fs` is NULL.
210
216
*/
211
217
ssize_t zms_calc_free_space (struct zms_fs * fs );
212
218
@@ -217,6 +223,7 @@ ssize_t zms_calc_free_space(struct zms_fs *fs);
217
223
*
218
224
* @retval >=0 Number of free bytes in the currently active sector
219
225
* @retval -EACCES if ZMS is still not initialized.
226
+ * @retval -EINVAL if `fs` is NULL.
220
227
*/
221
228
ssize_t zms_active_sector_free_space (struct zms_fs * fs );
222
229
@@ -234,6 +241,7 @@ ssize_t zms_active_sector_free_space(struct zms_fs *fs);
234
241
* @retval 0 on success.
235
242
* @retval -EACCES if ZMS is still not initialized.
236
243
* @retval -EIO if there is a memory read/write error.
244
+ * @retval -EINVAL if `fs` is NULL.
237
245
*/
238
246
int zms_sector_use_next (struct zms_fs * fs );
239
247
0 commit comments