wut/libraries/wutdevoptab/devoptab_fs_dirreset.c
James Benton 690bd6ccbd Revert "Rename wutdevoptab to wutdevoptab_sd"
This reverts commit 865af4609c.
Turns out it is for whole filesystem. oops.
2018-07-19 08:51:40 +01:00

24 lines
436 B
C

#include "devoptab_fs.h"
int
__wut_fs_dirreset(struct _reent *r,
DIR_ITER *dirState)
{
FSStatus rc;
// Set up command block
FSCmdBlock fsCmd;
FSInitCmdBlock(&fsCmd);
__wut_fs_dir_t *dir = (__wut_fs_dir_t *)(dirState->dirStruct);
rc = FSRewindDir(__wut_devoptab_fs_client, &fsCmd, dir->fd, -1);
if (rc >= 0) {
return 0;
}
r->_errno = __wut_fs_translate_error(rc);
return -1;
}