public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm tools: ignore nonexisting custom stage2
@ 2011-12-21 10:15 Konstantin Khlebnikov
  2011-12-21  9:46 ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2011-12-21 10:15 UTC (permalink / raw)
  To: penberg, kvm

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);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-21 10:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 10:15 [PATCH] kvm tools: ignore nonexisting custom stage2 Konstantin Khlebnikov
2011-12-21  9:46 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox