#include <block_driver_base.hpp>


Public Member Functions | |
| block_driver_base (const string &driver_name, const state_flags flags=0) | |
| virtual const char * | name (void) const |
| Returns the driver's name. | |
| virtual bool | is (const state_flags flags) const |
| Returns whether a specific feature/state (or all) is currently present/active. | |
| virtual const state_flags | state (void) const |
| Returns all feature/state flags at once. | |
| virtual int | reset (void) |
| Resets the driver's state back to defaults as when powering up the machine. | |
| virtual int | flush_sectors (void) |
| Flushes all currently pending operations. | |
Protected Attributes | |
| const string | driver_name |
| state_flags | flags |
| virtual int block_driver_base::reset | ( | void | ) | [inline, virtual] |
Resets the driver's state back to defaults as when powering up the machine.
Returns 0 on success. Negative error codes otherwise.
Implements block_driver.
| virtual int block_driver_base::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.
Implements block_driver.
Reimplemented in raw_image.