GitOS
Operating system exercise
Loading...
Searching...
No Matches
disk_streamer.h
Go to the documentation of this file.
1#pragma once
2
4{
5 int pos;
6 struct disk* disk;
7};
8
9int diskstreamer_read(struct disk_stream* stream, void* out, int total);
10int diskstreamer_seek(struct disk_stream* stream, int pos);
11struct disk_stream* diskstreamer_new(int disk_id);
12void diskstreamer_close(struct disk_stream* stream);
int diskstreamer_seek(struct disk_stream *stream, int pos)
Seeks into specified offset in stream.
Definition disk_streamer.c:36
void diskstreamer_close(struct disk_stream *stream)
Frees allocated disk_stream.
Definition disk_streamer.c:83
int diskstreamer_read(struct disk_stream *stream, void *out, int total)
Reads specified amount of bytes into buffer.
Definition disk_streamer.c:50
struct disk_stream * diskstreamer_new(int disk_id)
Allocates and sets up new disk_stream struct.
Definition disk_streamer.c:16
Definition disk_streamer.h:4
int pos
Definition disk_streamer.h:5
struct disk * disk
Definition disk_streamer.h:6
Definition disk.h:19