On 20/05/2016 12:26, Kevin Wolf wrote:
> Hm, we have a few instances where an iterator variable is used for
> multiple loops, so we need to be able to use it in an assignment, i.e.
> it should be a compound literal. On the other hand, I seem to remember
> that compound literals can't be used as i
Am 20.05.2016 um 11:39 hat Paolo Bonzini geschrieben:
>
>
> On 20/05/2016 10:10, Kevin Wolf wrote:
> >> > Already posted a fix. I chose to keep the interface and free the
> >> > BdrvNextIterator inside bdrv_next(), when we return NULL after the last
> >> > element.
> > Oops, should have actually
On 20/05/2016 10:10, Kevin Wolf wrote:
>> > Already posted a fix. I chose to keep the interface and free the
>> > BdrvNextIterator inside bdrv_next(), when we return NULL after the last
>> > element.
> Oops, should have actually read your email... You're right about callers
> that prematurely exi
Am 20.05.2016 um 10:05 hat Kevin Wolf geschrieben:
> Am 20.05.2016 um 09:54 hat Paolo Bonzini geschrieben:
> > > +/* Iterates over all top-level BlockDriverStates, i.e. BDSs that are
> > > owned by
> > > + * the monitor or attached to a BlockBackend */
> > > +BdrvNextIterator *bdrv_next(BdrvNextIt
Am 20.05.2016 um 09:54 hat Paolo Bonzini geschrieben:
>
>
> On 19/05/2016 17:21, Kevin Wolf wrote:
> > We need to introduce a separate BdrvNextIterator struct that can keep
> > more state than just the current BDS in order to avoid using the bs->blk
> > pointer.
> >
> > Signed-off-by: Kevin Wolf
On 19/05/2016 17:21, Kevin Wolf wrote:
> We need to introduce a separate BdrvNextIterator struct that can keep
> more state than just the current BDS in order to avoid using the bs->blk
> pointer.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> ---
> block.c|
We need to introduce a separate BdrvNextIterator struct that can keep
more state than just the current BDS in order to avoid using the bs->blk
pointer.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block.c| 40 +++
block/block-backend.c