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