1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::prelude::*;

#[repr(C)]
pub struct kos_blockdev_t {
    dev_data:       *mut c_void,
    l_block_size:   u32,
    init:           Option<extern "C" fn(d: *mut kos_blockdev_t) -> c_int>,
    shutdown:       Option<extern "C" fn(d: *mut kos_blockdev_t) -> c_int>,
    read_blocks:    Option<extern "C" fn(d: *mut kos_blockdev_t, block: u64,
                                         count: c_size_t, buf: *mut c_void) -> c_int>,
    write_blocks:   Option<extern "C" fn(d: *mut kos_blockdev_t, block: u64,
                                         count: c_size_t, buf: *const c_void) -> c_int>,
    count_blocks:   Option<extern "C" fn(d: *mut kos_blockdev_t) -> u64>,
    flush:          Option<extern "C" fn(d: *mut kos_blockdev_t) -> c_int>,
}