aboutsummaryrefslogtreecommitdiff
path: root/sdk-modifications/libsrc/fs/ds2_unistd.c
blob: 8625eba35d5d1f85972c69bf28f2fdc5186adeb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "ds2_unistd.h"
#include "fs_api.h"

int close(int fildes) {
	return _FAT_close_r (&__REENT, fildes);
}

int lseek(int fildes, int offset, int whence) {
	return _FAT_seek_r (&__REENT, fildes, (int)offset, whence);
}

int read(int fildes, void* buf, size_t len) {
	return _FAT_read_r (&__REENT, fildes, (char*)buf, len);
}

int write(int fildes, const void* buf, size_t len) {
	return _FAT_write_r (&__REENT, fildes, (const char*)buf, len);
}