Block device partition class.
More...
#include <cmsis-plus/posix-io/block-device-partitions.h>
|
|
| block_device_partition (block_device_impl &impl, const char *name) |
|
virtual | ~block_device_partition () override |
|
|
void | configure (blknum_t offset, blknum_t nblocks) |
|
block_device_partition_impl & | impl (void) const |
|
|
virtual int | vioctl (int request, std::va_list args) override |
|
virtual ssize_t | read_block (void *buf, blknum_t blknum, std::size_t nblocks=1) |
|
virtual ssize_t | write_block (const void *buf, blknum_t blknum, std::size_t nblocks=1) |
|
blknum_t | blocks (void) |
|
std::size_t | block_logical_size_bytes (void) |
|
std::size_t | block_physical_size_bytes (void) |
|
|
virtual ssize_t | read (void *buf, std::size_t nbyte) |
|
virtual ssize_t | write (const void *buf, std::size_t nbyte) |
|
virtual ssize_t | writev (const iovec *iov, int iovcnt) |
|
int | fcntl (int cmd,...) |
|
virtual int | vfcntl (int cmd, std::va_list args) |
|
int | isatty (void) |
|
virtual int | fstat (struct stat *buf) |
|
virtual off_t | lseek (off_t offset, int whence) |
|
type_t | get_type (void) const |
|
file_descriptor_t | file_descriptor (void) const |
|
bool | is_opened (void) |
|
|
int | open (const char *path=nullptr, int oflag=0,...) |
|
int | vopen (const char *path, int oflag, std::va_list args) |
|
virtual int | close (void) override |
|
int | ioctl (int request,...) |
|
virtual void | sync (void) |
|
virtual bool | match_name (const char *name) const |
|
const char * | name (void) const |
|
static const char * | device_prefix (void) |
|
Block device partition class.
Definition at line 52 of file block-device-partition.h.
◆ blknum_t
◆ type_t
Definition at line 127 of file io.h.
◆ type
Enumerator |
---|
unknown | |
not_set | |
char_device | |
block_device | |
tty | |
file | |
socket | |
Definition at line 128 of file io.h.
◆ block_device_partition()
os::posix::block_device_partition::block_device_partition |
( |
block_device_impl & |
impl, |
|
|
const char * |
name |
|
) |
| |
◆ ~block_device_partition()
os::posix::block_device_partition::~block_device_partition |
( |
| ) |
|
|
overridevirtual |
◆ alloc_file_descriptor()
io * os::posix::io::alloc_file_descriptor |
( |
void |
| ) |
|
|
protectedinherited |
◆ block_logical_size_bytes()
std::size_t os::posix::block_device::block_logical_size_bytes |
( |
void |
| ) |
|
|
inlineinherited |
- Returns
- The number of bytes in a block.
Definition at line 472 of file block-device.h.
◆ block_physical_size_bytes()
std::size_t os::posix::block_device::block_physical_size_bytes |
( |
void |
| ) |
|
|
inlineinherited |
◆ blocks()
◆ clear_file_descriptor()
void os::posix::io::clear_file_descriptor |
( |
void |
| ) |
|
|
inlineprotectedinherited |
Definition at line 450 of file io.h.
◆ close()
int os::posix::device::close |
( |
void |
| ) |
|
|
overridevirtualinherited |
◆ configure()
void os::posix::block_device_partition::configure |
( |
blknum_t |
offset, |
|
|
blknum_t |
nblocks |
|
) |
| |
◆ device_prefix()
const char * os::posix::device::device_prefix |
( |
void |
| ) |
|
|
inlinestaticinherited |
◆ fcntl()
int os::posix::io::fcntl |
( |
int |
cmd, |
|
|
|
... |
|
) |
| |
|
inherited |
◆ file_descriptor() [1/2]
Definition at line 444 of file io.h.
◆ file_descriptor() [2/2]
Definition at line 456 of file io.h.
◆ fstat()
int os::posix::io::fstat |
( |
struct stat * |
buf | ) |
|
|
virtualinherited |
◆ get_type()
Definition at line 438 of file io.h.
◆ impl()
◆ ioctl()
int os::posix::device::ioctl |
( |
int |
request, |
|
|
|
... |
|
) |
| |
|
inherited |
◆ is_opened()
bool os::posix::io::is_opened |
( |
void |
| ) |
|
|
inlineinherited |
Definition at line 462 of file io.h.
◆ isatty()
int os::posix::io::isatty |
( |
void |
| ) |
|
|
inherited |
◆ lseek()
off_t os::posix::io::lseek |
( |
off_t |
offset, |
|
|
int |
whence |
|
) |
| |
|
virtualinherited |
◆ match_name()
bool os::posix::device::match_name |
( |
const char * |
name | ) |
const |
|
virtualinherited |
◆ name()
const char * os::posix::device::name |
( |
void |
| ) |
const |
|
inlineinherited |
◆ open()
int os::posix::device::open |
( |
const char * |
path = nullptr , |
|
|
int |
oflag = 0 , |
|
|
|
... |
|
) |
| |
|
inherited |
- Parameters
-
path | May be nullptr. |
oflag | Output flags |
- Returns
- non-negative file descriptor, -1 on failure
Definition at line 64 of file device.cpp.
◆ read()
ssize_t os::posix::io::read |
( |
void * |
buf, |
|
|
std::size_t |
nbyte |
|
) |
| |
|
virtualinherited |
◆ read_block()
ssize_t os::posix::block_device::read_block |
( |
void * |
buf, |
|
|
blknum_t |
blknum, |
|
|
std::size_t |
nblocks = 1 |
|
) |
| |
|
virtualinherited |
◆ sync()
void os::posix::device::sync |
( |
void |
| ) |
|
|
virtualinherited |
◆ vfcntl()
int os::posix::io::vfcntl |
( |
int |
cmd, |
|
|
std::va_list |
args |
|
) |
| |
|
virtualinherited |
◆ vioctl()
int os::posix::block_device::vioctl |
( |
int |
request, |
|
|
std::va_list |
args |
|
) |
| |
|
overridevirtualinherited |
◆ vopen()
int os::posix::device::vopen |
( |
const char * |
path, |
|
|
int |
oflag, |
|
|
std::va_list |
args |
|
) |
| |
|
inherited |
- Parameters
-
path | May be nullptr. |
oflag | Output flags |
args | Arguments |
- Returns
- non-negative file descriptor, -1 on failure
Definition at line 76 of file device.cpp.
◆ write()
ssize_t os::posix::io::write |
( |
const void * |
buf, |
|
|
std::size_t |
nbyte |
|
) |
| |
|
virtualinherited |
◆ write_block()
ssize_t os::posix::block_device::write_block |
( |
const void * |
buf, |
|
|
blknum_t |
blknum, |
|
|
std::size_t |
nblocks = 1 |
|
) |
| |
|
virtualinherited |
◆ writev()
ssize_t os::posix::io::writev |
( |
const iovec * |
iov, |
|
|
int |
iovcnt |
|
) |
| |
|
virtualinherited |
The documentation for this class was generated from the following files: