#include <raw_image.hpp>


Public Member Functions | |
| raw_image (const string &filename, 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). | |
| virtual int | flush_sectors (void) |
| Flushes all currently pending operations. | |
Protected Attributes | |
| const string | driver_name |
| l4vmm_file | file |
| virtual int raw_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 raw_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.
| virtual int raw_image::flush_sectors | ( | void | ) | [inline, virtual] |
Flushes all currently pending operations.
That is requests to write to the backend, if the driver provides some mechanism to cache blocks. Returns 0 on success. Negative error codes otherwise.
Reimplemented from block_driver_base.