[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 3/4] qemu-img: add max-size subcommand
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC 3/4] qemu-img: add max-size subcommand |
Date: |
Fri, 10 Mar 2017 12:42:56 +0800 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Mar 03, 2017 at 11:56:54PM +0200, Nir Soffer wrote:
> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi <address@hidden> wrote:
> > + ret_size = bdrv_max_size(drv, opts, in_blk ? blk_bs(in_blk) : NULL,
> > + &local_err);
> > + if (local_err) {
> > + error_report_err(local_err);
> > + goto fail;
> > + }
> > +
> > + if (output_format == OFORMAT_HUMAN) {
> > + printf("%" PRIu64 "\n", ret_size);
> > + } else {
> > + printf("{ \"size\": %" PRIu64 " }\n", ret_size);
> > + }
> > +
> > + ret = 0;
> > +
> > +fail:
>
> This looks more like out: to me, since we use it both for normal
> and abnormal flows.
Looking at the source file there is no consistency: "err", "fail", "out"
are all used in various places. I'm happy to switch this to "out", but
for the record, I find "fail" clearer since it communicates the
intention that this is an error return.
Will fix.
signature.asc
Description: PGP signature
- [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand, Stefan Hajnoczi, 2017/03/03
- [Qemu-devel] [RFC 1/4] block: add bdrv_max_size() API, Stefan Hajnoczi, 2017/03/03
- [Qemu-devel] [RFC 2/4] raw-format: add bdrv_max_size() support, Stefan Hajnoczi, 2017/03/03
- [Qemu-devel] [RFC 3/4] qemu-img: add max-size subcommand, Stefan Hajnoczi, 2017/03/03
- [Qemu-devel] [RFC 4/4] iotests: add test 178 for qemu-img max-size, Stefan Hajnoczi, 2017/03/03
- Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand, John Snow, 2017/03/03
- Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand, Nir Soffer, 2017/03/03
- Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand, Daniel P. Berrange, 2017/03/07