qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] qemu-img: change opening method for the outp


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd
Date: Mon, 22 Aug 2016 07:39:42 -0400
User-agent: Mutt/1.6.2 (2016-07-01)

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]