diff options
author | Anton Kling <anton@kling.gg> | 2024-06-22 21:41:46 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-06-22 21:41:46 +0200 |
commit | 5fbd9b519e082fc235a8a57c6cf761e6cefbfb62 (patch) | |
tree | d9df62f8bf6ed6b17a7b61aa77f61da9d097c5ff /userland/libc/stdio/fseek.c | |
parent | 5e10cdd5b4aa7486208dd14ebef4254ec5b5d03a (diff) |
LibC: Fix bugs relating to fseek
Diffstat (limited to 'userland/libc/stdio/fseek.c')
-rw-r--r-- | userland/libc/stdio/fseek.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/userland/libc/stdio/fseek.c b/userland/libc/stdio/fseek.c index fb891ec..cbccbb8 100644 --- a/userland/libc/stdio/fseek.c +++ b/userland/libc/stdio/fseek.c @@ -1,21 +1,8 @@ -#include <stdio.h> #include <assert.h> +#include <stdio.h> int fseek(FILE *stream, long offset, int whence) { - return stream->seek(stream, offset, whence); - /* - switch (whence) { - case SEEK_SET: - stream->offset_in_file = offset; - break; - case SEEK_CUR: - stream->offset_in_file += offset; - break; - case SEEK_END: - // FIXME - assert(0); - break; - } - // FIXME: Error checking - return 0;*/ + stream->read_buffer_stored = 0; + assert(stream->seek); + return stream->seek(stream, offset, whence); } |