public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: penberg@kernel.org, kvm@vger.kernel.org
Subject: [PATCH] kvm tools: ignore nonexisting custom stage2
Date: Wed, 21 Dec 2011 13:15:09 +0300	[thread overview]
Message-ID: <20111221091509.19899.90043.stgit@zurg> (raw)

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

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
 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);


             reply	other threads:[~2011-12-21  9:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 10:15 Konstantin Khlebnikov [this message]
2011-12-21  9:46 ` [PATCH] kvm tools: ignore nonexisting custom stage2 Sasha Levin
2011-12-21  9:49   ` Konstantin Khlebnikov
2011-12-21 10:11     ` Sasha Levin
2011-12-21 10:15       ` Konstantin Khlebnikov
2011-12-21 10:18         ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111221091509.19899.90043.stgit@zurg \
    --to=khlebnikov@openvz.org \
    --cc=kvm@vger.kernel.org \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox