mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-13 22:21:52 +01:00
23 lines
434 B
C
23 lines
434 B
C
#include "devoptab_sd.h"
|
|
|
|
int
|
|
__wut_fs_dirclose(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 = FSCloseDir(__wut_devoptab_sd_client, &fsCmd, dir->fd, -1);
|
|
|
|
if (rc >= 0) {
|
|
return 0;
|
|
}
|
|
|
|
r->_errno = __wut_fs_translate_error(rc);
|
|
return -1;
|
|
}
|