Am 12.02.2025 um 16:05 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > +/// A request to a block driver
> > +pub enum Request {
> > +Read { offset: u64, len: u64 },
> > +}
> > +
>
> Maybe add flags already?
> > +#[allow(dead_code)]
> > +pub enum MappingTarget {
> > +
On 2/11/25 22:43, Kevin Wolf wrote:
+/// A request to a block driver
+pub enum Request {
+Read { offset: u64, len: u64 },
+}
+
Maybe add flags already?
+#[allow(dead_code)]
+pub enum MappingTarget {
+/// The described blocks are unallocated. Reading from them yields zeros.
+Unmappe
This adds a map() function to the BlockDriver trait and makes use of it
to implement reading from an image.
Signed-off-by: Kevin Wolf
---
rust/block/src/driver.rs | 100 +++
1 file changed, 100 insertions(+)
diff --git a/rust/block/src/driver.rs b/rust/block/