Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added rewinddir support to dcload #41

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion kernel/arch/dreamcast/fs/fs_dcload.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,19 @@ static int dcload_fcntl(void *h, int cmd, va_list ap) {
return rv;
}

static int dcload_rewinddir(void *h) {
int rv = -1;
uint32_t hnd = (uint32_t)h;

spinlock_lock(&dcload_lock);

rv = dclsc(DCLOAD_REWINDDIR, hnd);

spinlock_unlock(&dcload_lock);

return rv;
}

/* Pull all that together */
static vfs_handler_t vh = {
/* Name handler */
Expand Down Expand Up @@ -439,7 +452,7 @@ static vfs_handler_t vh = {
NULL, /* tell64 */
NULL, /* total64 */
NULL, /* readlink */
NULL, /* rewinddir */
dcload_rewinddir,
NULL /* fstat */
};

Expand Down
1 change: 1 addition & 0 deletions kernel/arch/dreamcast/include/dc/fs_dcload.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extern int dcload_type;
#define DCLOAD_READDIR 18
#define DCLOAD_GETHOSTINFO 19
#define DCLOAD_GDBPACKET 20
#define DCLOAD_REWINDDIR 21

/* dcload syscall function */
int dcloadsyscall(uint32_t syscall, ...);
Expand Down