Skip to content

Commit 00068dd

Browse files
blockstoragedevice: add a couple of getters.
1 parent dfea8fa commit 00068dd

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

devices/storage/blockstoragedevice.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,26 @@ class BlockStorageDevice {
4747
int write_more();
4848
void write_cache();
4949

50+
uint32_t get_remaining_size() {
51+
return this->remain_size;
52+
}
53+
54+
uint8_t* get_cache_ptr() {
55+
return (uint8_t *)this->data_cache.get();
56+
}
57+
58+
bool medium_writable() {
59+
return this->is_writeable;
60+
}
61+
62+
uint64_t get_size_in_blocks() {
63+
return this->size_blocks;
64+
}
65+
66+
uint32_t get_block_size() {
67+
return this->block_size;
68+
}
69+
5070
protected:
5171
void fill_cache(const int nblocks);
5272

0 commit comments

Comments
 (0)