Re: [PATCH v2 08/11] rust/block: Add driver module

2025-03-04 Thread Stefan Hajnoczi
On Tue, Feb 18, 2025 at 07:20:16PM +0100, Kevin Wolf wrote: > This adds a barebones module for a block driver interface. Because there > is no native QAPI support for Rust yet, opening images takes a few > unsafe functions to call into C visitor functions. This should be > cleaned up later. > > Si

Re: [PATCH v2 08/11] rust/block: Add driver module

2025-02-19 Thread Zhao Liu
> +impl BdrvChild { > +/// Creates a new child reference from a `BlockdevRef`. > +pub unsafe fn new( > +parent: *mut bindings::BlockDriverState, > +bref: *mut bindings::BlockdevRef, > +errp: *mut *mut bindings::Error, > +) -> Option { > +unsafe { > +

[PATCH v2 08/11] rust/block: Add driver module

2025-02-18 Thread Kevin Wolf
This adds a barebones module for a block driver interface. Because there is no native QAPI support for Rust yet, opening images takes a few unsafe functions to call into C visitor functions. This should be cleaned up later. Signed-off-by: Kevin Wolf --- rust/block/src/driver.rs | 195 +++