On Wed, Feb 27, 2013 at 06:25:51PM +0100, Kevin Wolf wrote:
> @@ -780,15 +788,28 @@ int bdrv_open_backing_file(BlockDriverState *bs)
>  
>  /*
>   * Opens a disk image (raw, qcow2, vmdk, ...)
> + *
> + * options is a QDict of options to pass to the block drivers, or NULL for an
> + * empty set of options. The reference to the QDict belongs to the block 
> layer
> + * after the call, so if the caller intends to reuse the dictionary, it needs
> + * to use QINCREF() before calling bdrv_open.
>   */

It's helpful to be explicit about ownership when the function fails:
"The reference to the QDict belongs to the block layer after the call
(even on failure)".

Reply via email to