Re: [Qemu-block] [PATCH 7/8] block: Make bdrv_open() return a BDS

2015-12-02 Thread Max Reitz
On 01.12.2015 15:44, Alberto Garcia wrote: > On Tue 10 Nov 2015 04:44:22 AM CET, Max Reitz wrote: >> @@ -1398,32 +1397,21 @@ static int bdrv_open_inherit(BlockDriverState **pbs, >> const char *filename, >> bool options_non_empty = options ? qdict_size(options) : false; >>

Re: [Qemu-block] [PATCH 7/8] block: Make bdrv_open() return a BDS

2015-12-01 Thread Alberto Garcia
On Tue 10 Nov 2015 04:44:22 AM CET, Max Reitz wrote: > @@ -1398,32 +1397,21 @@ static int bdrv_open_inherit(BlockDriverState **pbs, > const char *filename, > bool options_non_empty = options ? qdict_size(options) : false; > QDECREF(options); > > -if (*pbs) { > -

[Qemu-block] [PATCH 7/8] block: Make bdrv_open() return a BDS

2015-11-09 Thread Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret