[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create()
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create() |
Date: |
Tue, 28 Oct 2014 13:27:45 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 27.10.2014 um 13:30 hat Max Reitz geschrieben:
> Currently, when trying to create a backed image without specifying its
> size, when the backing file does not exist or is not accessible, an
> appropriate error message will be generated which is then (in
> bdrv_img_create()) prefixed with the image file name and the strerror().
> However, both are generally already part of the bdrv_open() error
> message, so we should not double this information. An example:
>
> $ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2
> qemu-img: /tmp/img.qcow2: Could not open '/tmp/enoent': Could not open
> '/tmp/enoent': No such file or directory: No such file or directory
>
> Just propagating the error is sufficient:
>
> $ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2
> qemu-img /tmp/img.qcow2: Could not open '/tmp/enoent': No such file or
> directory
Reviewed-by: Kevin Wolf <address@hidden>