[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH] block: failed qemu-img command should return non-ze
From: |
Xu Tian |
Subject: |
[Qemu-block] [PATCH] block: failed qemu-img command should return non-zero exit code |
Date: |
Sun, 9 Oct 2016 17:17:27 +0800 |
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.
Signed-off-by: Xu Tian <address@hidden>
---
qemu-img.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index 46f2a6d..37dcade 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -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;
}
}
--
2.5.5
- [Qemu-block] [PATCH] block: failed qemu-img command should return non-zero exit code,
Xu Tian <=