#include <memory_image.hpp>


Public Member Functions | |
| memory_image (l4_sector_t size=MIN_SECTOR_NUMBER, const state_flags flags=0) | |
| virtual l4_sector_t | sectors (void) const |
| Returns the number of disk sectors the underlying medium (e.g a file) provides. | |
| virtual int | read_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number) |
| Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough). | |
| virtual int | write_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number) |
| Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough). | |
Protected Attributes | |
| const l4_sector_t | size |
| uint8_t *const | data |
| virtual int memory_image::read_sectors | ( | uint8_t * | buffer, | |
| l4_sector_t | sector, | |||
| l4_sector_t | number | |||
| ) | [inline, virtual] |
Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough).
Returns 0 on success. Negative error codes otherwise.
Implements block_driver.
References block_driver_base::is(), and block_driver_constants::READY.
| virtual int memory_image::write_sectors | ( | uint8_t * | buffer, | |
| l4_sector_t | sector, | |||
| l4_sector_t | number | |||
| ) | [inline, virtual] |
Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough).
Returns 0 on success. Negative error codes otherwise.
Implements block_driver.
References block_driver_base::is(), and block_driver_constants::READY.