2022-06-27 19:36:56 +02:00
|
|
|
/*
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
UMKa - User-Mode KolibriOS developer tools
|
|
|
|
vdisk - virtual disk
|
|
|
|
|
2023-01-05 06:20:40 +01:00
|
|
|
Copyright (C) 2020-2023 Ivan Baravy <dunkaist@gmail.com>
|
2022-06-27 19:36:56 +02:00
|
|
|
*/
|
|
|
|
|
2020-02-21 00:18:40 +01:00
|
|
|
#ifndef VDISK_H_INCLUDED
|
|
|
|
#define VDISK_H_INCLUDED
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
2020-05-07 03:57:01 +02:00
|
|
|
#include "umka.h"
|
2020-02-21 00:18:40 +01:00
|
|
|
|
2023-01-04 01:15:40 +01:00
|
|
|
struct vdisk {
|
|
|
|
diskfunc_t diskfunc;
|
|
|
|
uint32_t sect_size;
|
|
|
|
uint64_t sect_cnt;
|
|
|
|
unsigned cache_size;
|
2023-01-16 05:54:34 +01:00
|
|
|
int adjust_cache_size;
|
2023-02-06 17:01:37 +01:00
|
|
|
const void *io;
|
2023-01-04 01:15:40 +01:00
|
|
|
};
|
2020-02-21 03:21:09 +01:00
|
|
|
|
2023-01-04 01:15:40 +01:00
|
|
|
struct vdisk*
|
2023-02-06 17:01:37 +01:00
|
|
|
vdisk_init(const char *fname, const int adjust_cache_size,
|
|
|
|
const size_t cache_size, const void *io);
|
2020-05-07 03:41:08 +02:00
|
|
|
|
2020-02-21 00:18:40 +01:00
|
|
|
#endif // VDISK_H_INCLUDED
|