Ivan Baravy
5822be9942
It is useless since host OS cache is used anyway. It also slows down coverage collection because of many taken branches. Specialized tests should be written to test disk cache specifically.
28 lines
728 B
C
28 lines
728 B
C
#ifndef VDISK_H_INCLUDED
|
|
#define VDISK_H_INCLUDED
|
|
|
|
#include <stdio.h>
|
|
#include <inttypes.h>
|
|
#include "kolibri.h"
|
|
|
|
void *vdisk_init(const char *fname, unsigned cache_size);
|
|
|
|
__attribute__((__stdcall__))
|
|
void vdisk_close(void *userdata);
|
|
|
|
__attribute__((__stdcall__))
|
|
int vdisk_read(void *userdata, void *buffer, off_t startsector,
|
|
size_t *numsectors);
|
|
|
|
__attribute__((__stdcall__))
|
|
int vdisk_write(void *userdata, void *buffer, off_t startsector,
|
|
size_t *numsectors);
|
|
|
|
__attribute__((__stdcall__))
|
|
int vdisk_querymedia(void *userdata, diskmediainfo_t *minfo);
|
|
|
|
__attribute__((__stdcall__))
|
|
unsigned int vdisk_adjust_cache_size(void *userdata, unsigned suggested_size);
|
|
|
|
#endif // VDISK_H_INCLUDED
|