On Fri, Aug 19, 2016 at 09:06:08PM +0200, Reda Sallahi wrote: > On Tue, Aug 16, 2016 at 12:09:06PM +0100, Stefan Hajnoczi wrote: > > On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > > > + blk2 = blk_new_open(image_opts ? NULL : out.filename, > > > + NULL, qoptions, BDRV_O_RDWR, NULL); > > > > This code duplicates a subset of img_open(). Why can't you use > > img_open() or at least img_open_opts()/img_open_file()? > > If I used img_open() here (or img_open_opts()/img_open_file() for that > matter) it would have written on stderr that the file couldn't be opened > here even though in this case it's not error if we can create the output > image and open it later on.
Then img_open() should be extended so the caller can suppress the error message or gets a Error object instead of output to stderr. Stefan
signature.asc
Description: PGP signature