Implement syscall for seek w/ S.
This commit is contained in:
@@ -249,9 +249,15 @@ syscall_write (int fd, const void *buffer, unsigned size)
|
||||
}
|
||||
|
||||
static void
|
||||
syscall_seek (int fd UNUSED, unsigned position UNUSED)
|
||||
syscall_seek (int fd, unsigned position)
|
||||
{
|
||||
//TODO
|
||||
struct open_file *file_info = fd_get_file (fd);
|
||||
if (file_info != NULL)
|
||||
{
|
||||
lock_acquire (&filesys_lock);
|
||||
file_seek (file_info->file, position);
|
||||
lock_release (&filesys_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned
|
||||
|
||||
Reference in New Issue
Block a user