summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/stdio/fseek.c')
-rw-r--r--userland/libc/stdio/fseek.c21
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);
}