blob: 7d911e62e1dc69d1d59b5ba2ddf5e84c52355fc7 [file] [log] [blame]
Greg Watsonb9f5c112004-03-13 03:09:57 +00001#include <console/console.h>
2#include <stdlib.h>
3#include <stddef.h>
4#include <stream/read_bytes.h>
5#include <string.h>
6#include <fs/fs.h>
7
8char *boot_file;
9
10int stream_init(void)
11{
12 return file_open(boot_file);
13}
14
15
16void stream_fini(void)
17{
18 return;
19}
20
21byte_offset_t stream_skip(byte_offset_t count)
22{
23 unsigned long pos = file_pos();
24 if (file_seek(count+pos) != count+pos)
25 return 0;
26 return count;
27}
28
29byte_offset_t stream_read(void *vdest, byte_offset_t count)
30{
31 return file_read(vdest, count);
32}