mirror of
https://github.com/Ryuzaki-MrL/savemii.git
synced 2026-05-03 11:26:11 -05:00
26 lines
453 B
C
26 lines
453 B
C
#include "extusb_devoptab.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int __extusb_fs_fsync(struct _reent *r,
|
|
void *fd) {
|
|
if (!fd) {
|
|
r->_errno = EINVAL;
|
|
return -1;
|
|
}
|
|
|
|
__extusb_fs_file_t *file = (__extusb_fs_file_t *) fd;
|
|
FRESULT fr = f_sync(&file->fp);
|
|
if (fr != FR_OK) {
|
|
r->_errno = __extusb_fs_translate_error(fr);
|
|
return -1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |