From e46b0a8c4eb33cdea4094d04ad0fef3e521327df Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 14 Jul 2010 14:58:25 +0300 Subject: [PATCH] kvm: Fix load_bzimage for flat binaries We must not die if load_bzimage() fails because we want to fall-back to loading flat binaries. Signed-off-by: Pekka Enberg --- tools/kvm/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 5c604b4c7eb2..5195dafb144c 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -299,7 +299,7 @@ static bool load_bzimage(struct kvm *self, int fd, const char *kernel_cmdline) die_perror("lseek"); if (read(fd, &boot, sizeof(boot)) != sizeof(boot)) - die_perror("read"); + return false; if (memcmp(&boot.hdr.header, BZIMAGE_MAGIC, strlen(BZIMAGE_MAGIC)) != 0) return false; -- 2.39.5