Skip to contentSkip to conversation

block: failed qemu-img command should return non-zero exit code

PATCH Applied Reda Sallahi 2 participants 2 messages Oct 9, 2016 – Oct 10, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 32 lines · Xu Tian

If backing file can not open when do qemu-img rebase, var 'ret' not assign a no-zero value, qemu-img process go out with exit code zero.

---
 qemu-img.c | 2 ++
 1 file changed, 2 insertions(+)
qemu-img.c +2 -0
index 46f2a6d..37dcade 100644
@@ -2918,6 +2918,7 @@ static int img_rebase(int argc, char **argv)
             error_reportf_err(local_err,
                               "Could not open old backing file '%s': ",
                               backing_name);
+            ret = -1;
             goto out;
         }
 
@@ -2935,6 +2936,7 @@ static int img_rebase(int argc, char **argv)
                 error_reportf_err(local_err,
                                   "Could not open new backing file '%s': ",
                                   out_baseimg);
+                ret = -1;
                 goto out;
             }
         }
Signature · 1 line
2.5.5

Hi Xu,

You should also CC [email protected] (and maybe Max Reitz too) in your patch.

Signature · 1 line
Reda
Applied
#2 lore raw

Am 09.10.2016 um 15:25 hat Reda Sallahi geschrieben:

Quoted 10 lines · Xu Tian
Quoted 4 lines

If backing file can not open when do qemu-img rebase, var 'ret' not assign a no-zero value, qemu-img process go out with exit code zero.

Hi Xu,

You should also CC [email protected] (and maybe Max Reitz too) in your patch.

Yes, please do so for your next patch. No need to resend this one, though.

Thanks, applied to the block branch.

Kevin