Re: [PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-26 Thread Michael Tokarev

26.02.2024 17:14, Daniel P. Berrangé :

On Thu, Feb 22, 2024 at 12:15:42AM +0300, Michael Tokarev wrote:

Currently we have:

   ./qemu-img resize none +10
   qemu-img: Could not open 'none': Could not open 'none': No such file or 
directory

stop printing the message twice, - local_err already has
all the info, no need to prepend additional text there.

There are a few other places like this, but I'm unsure
about these.

Signed-off-by: Michael Tokarev 
---
  qemu-img.c | 8 +++-
  1 file changed, 3 insertions(+), 5 deletions(-)


Reviewed-by: Daniel P. Berrangé 


Unfortunately I have to drop this one for now, - it requires
much more work.  For example, after this we have:

-qemu-img: TEST_DIR/t.IMGFMT: Extended L2 entries are only supported with 
cluster sizes of at least 16384 bytes
+qemu-img: Extended L2 entries are only supported with cluster sizes of at 
least 16384 bytes

-qemu-img: Could not open 'TEST_DIR/t.IMGFMT': L1 table is too small
+qemu-img: L1 table is too small

-qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Could not open 'foo': No such 
file or directory
+qemu-img: Could not open 'foo': No such file or directory

and a few other interesting cases.

This whole thing needs a much bigger revisit.

/mjt



Re: [PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-26 Thread Michael Tokarev

22.02.2024 00:15, Michael Tokarev :

Currently we have:

   ./qemu-img resize none +10
   qemu-img: Could not open 'none': Could not open 'none': No such file or 
directory


This one needs expected-output tweaks for tests.

/mjt



Re: [PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-26 Thread Daniel P . Berrangé
On Thu, Feb 22, 2024 at 12:15:42AM +0300, Michael Tokarev wrote:
> Currently we have:
> 
>   ./qemu-img resize none +10
>   qemu-img: Could not open 'none': Could not open 'none': No such file or 
> directory
> 
> stop printing the message twice, - local_err already has
> all the info, no need to prepend additional text there.
> 
> There are a few other places like this, but I'm unsure
> about these.
> 
> Signed-off-by: Michael Tokarev 
> ---
>  qemu-img.c | 8 +++-
>  1 file changed, 3 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé 


With regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|