mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-09 05:20:39 +01:00
690bd6ccbd
This reverts commit 865af4609c
.
Turns out it is for whole filesystem. oops.
23 lines
404 B
C
23 lines
404 B
C
#include "devoptab_fs.h"
|
|
|
|
int
|
|
__wut_fs_fsync(struct _reent *r,
|
|
void *fd)
|
|
{
|
|
FSStatus rc;
|
|
__wut_fs_file_t *file = (__wut_fs_file_t *)fd;
|
|
|
|
// Set up command block
|
|
FSCmdBlock fsCmd;
|
|
FSInitCmdBlock(&fsCmd);
|
|
|
|
rc = FSFlushFile(__wut_devoptab_fs_client, &fsCmd, file->fd, -1);
|
|
|
|
if (rc >= 0) {
|
|
return 0;
|
|
}
|
|
|
|
r->_errno = __wut_fs_translate_error(rc);
|
|
return -1;
|
|
}
|