fix permanent failing with message "Fatal: Failed linking stage 2 of init."
if there is no custom init_stage2.

Signed-off-by: Konstantin Khlebnikov <[email protected]>
---
 tools/kvm/builtin-run.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index fac274c..094c0fa2 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -752,7 +752,7 @@ static int kvm_custom_stage2(void)
 
        src = realpath("guest/init_stage2", NULL);
        if (src == NULL)
-               return -ENOMEM;
+               return errno == ENOENT ? 0 : -errno;
 
        snprintf(tmp, PATH_MAX, "%s%s/virt/init_stage2", kvm__get_dir(), 
rootfs);
        remove(tmp);

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to