Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit 9e2f91d

Browse files
committed
devkitARM r46 updates
1 parent d492657 commit 9e2f91d

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

source/fatfile.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ int _FAT_syncToDisc (FILE_STRUCT* file) {
382382
}
383383

384384

385-
int _FAT_close_r (struct _reent *r, int fd) {
385+
int _FAT_close_r (struct _reent *r, void *fd) {
386386
FILE_STRUCT* file = (FILE_STRUCT*) fd;
387387
int ret = 0;
388388

@@ -419,7 +419,7 @@ int _FAT_close_r (struct _reent *r, int fd) {
419419
return ret;
420420
}
421421

422-
ssize_t _FAT_read_r (struct _reent *r, int fd, char *ptr, size_t len) {
422+
ssize_t _FAT_read_r (struct _reent *r, void *fd, char *ptr, size_t len) {
423423
FILE_STRUCT* file = (FILE_STRUCT*) fd;
424424
PARTITION* partition;
425425
CACHE* cache;
@@ -713,7 +713,7 @@ static bool _FAT_file_extend_r (struct _reent *r, FILE_STRUCT* file) {
713713
return true;
714714
}
715715

716-
ssize_t _FAT_write_r (struct _reent *r, int fd, const char *ptr, size_t len) {
716+
ssize_t _FAT_write_r (struct _reent *r, void *fd, const char *ptr, size_t len) {
717717
FILE_STRUCT* file = (FILE_STRUCT*) fd;
718718
PARTITION* partition;
719719
CACHE* cache;
@@ -941,7 +941,7 @@ ssize_t _FAT_write_r (struct _reent *r, int fd, const char *ptr, size_t len) {
941941
}
942942

943943

944-
off_t _FAT_seek_r (struct _reent *r, int fd, off_t pos, int dir) {
944+
off_t _FAT_seek_r (struct _reent *r, void *fd, off_t pos, int dir) {
945945
FILE_STRUCT* file = (FILE_STRUCT*) fd;
946946
PARTITION* partition;
947947
uint32_t cluster, nextCluster;
@@ -1043,7 +1043,7 @@ off_t _FAT_seek_r (struct _reent *r, int fd, off_t pos, int dir) {
10431043

10441044

10451045

1046-
int _FAT_fstat_r (struct _reent *r, int fd, struct stat *st) {
1046+
int _FAT_fstat_r (struct _reent *r, void *fd, struct stat *st) {
10471047
FILE_STRUCT* file = (FILE_STRUCT*) fd;
10481048
PARTITION* partition;
10491049
DIR_ENTRY fileEntry;
@@ -1078,7 +1078,7 @@ int _FAT_fstat_r (struct _reent *r, int fd, struct stat *st) {
10781078
return 0;
10791079
}
10801080

1081-
int _FAT_ftruncate_r (struct _reent *r, int fd, off_t len) {
1081+
int _FAT_ftruncate_r (struct _reent *r, void *fd, off_t len) {
10821082
FILE_STRUCT* file = (FILE_STRUCT*) fd;
10831083
PARTITION* partition;
10841084
int ret=0;
@@ -1190,7 +1190,7 @@ int _FAT_ftruncate_r (struct _reent *r, int fd, off_t len) {
11901190
return ret;
11911191
}
11921192

1193-
int _FAT_fsync_r (struct _reent *r, int fd) {
1193+
int _FAT_fsync_r (struct _reent *r, void *fd) {
11941194
FILE_STRUCT* file = (FILE_STRUCT*) fd;
11951195
int ret = 0;
11961196

source/fatfile.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ typedef struct _FILE_STRUCT FILE_STRUCT;
7171

7272
int _FAT_open_r (struct _reent *r, void *fileStruct, const char *path, int flags, int mode);
7373

74-
int _FAT_close_r (struct _reent *r, int fd);
74+
int _FAT_close_r (struct _reent *r, void *fd);
7575

76-
ssize_t _FAT_write_r (struct _reent *r,int fd, const char *ptr, size_t len);
76+
ssize_t _FAT_write_r (struct _reent *r,void *fd, const char *ptr, size_t len);
7777

78-
ssize_t _FAT_read_r (struct _reent *r, int fd, char *ptr, size_t len);
78+
ssize_t _FAT_read_r (struct _reent *r, void *fd, char *ptr, size_t len);
7979

80-
off_t _FAT_seek_r (struct _reent *r, int fd, off_t pos, int dir);
80+
off_t _FAT_seek_r (struct _reent *r, void *fd, off_t pos, int dir);
8181

82-
int _FAT_fstat_r (struct _reent *r, int fd, struct stat *st);
82+
int _FAT_fstat_r (struct _reent *r, void *fd, struct stat *st);
8383

8484
int _FAT_stat_r (struct _reent *r, const char *path, struct stat *st);
8585

@@ -91,9 +91,9 @@ int _FAT_chdir_r (struct _reent *r, const char *name);
9191

9292
int _FAT_rename_r (struct _reent *r, const char *oldName, const char *newName);
9393

94-
int _FAT_ftruncate_r (struct _reent *r, int fd, off_t len);
94+
int _FAT_ftruncate_r (struct _reent *r, void *fd, off_t len);
9595

96-
int _FAT_fsync_r (struct _reent *r, int fd);
96+
int _FAT_fsync_r (struct _reent *r, void *fd);
9797

9898
/*
9999
Synchronizes the file data to disc.

0 commit comments

Comments
 (0)