From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khlebnikov Subject: [PATCH] kvm tools: ignore nonexisting custom stage2 Date: Wed, 21 Dec 2011 13:15:09 +0300 Message-ID: <20111221091509.19899.90043.stgit@zurg> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: penberg@kernel.org, kvm@vger.kernel.org Return-path: Received: from mail-we0-f174.google.com ([74.125.82.174]:33916 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363Ab1LUJPN (ORCPT ); Wed, 21 Dec 2011 04:15:13 -0500 Received: by werm1 with SMTP id m1so2535473wer.19 for ; Wed, 21 Dec 2011 01:15:12 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: fix permanent failing with message "Fatal: Failed linking stage 2 of init." if there is no custom init_stage2. Signed-off-by: Konstantin Khlebnikov --- 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);