[PATCH] kvm tools: ignore nonexisting custom stage2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux