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

[Xen-changelog] Theoretically a 0 VIRT_BASE is okay. Change the bail code when



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID dbe396fd6fd81925f05ad27c366a61c0b8aa592d
# Parent  18c3da3ad6f7f7d09944a0dcb9c95e4a7da13ee6
Theoretically a 0 VIRT_BASE is okay. Change the bail code when
parsing elf headers to bail only when VIRT_BASE is not specified
at all.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_load_elf.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff -r 18c3da3ad6f7 -r dbe396fd6fd8 tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Wed May 17 23:28:22 2006 +0100
+++ b/tools/libxc/xc_load_elf.c Wed May 17 23:41:59 2006 +0100
@@ -148,15 +148,13 @@ static int parseelfimage(const char *ima
 
     dsi->xen_guest_string = guestinfo;
 
-    virt_base = 0;
-    if ( (p = strstr(guestinfo, "VIRT_BASE=")) != NULL )
-        virt_base = strtoul(p+10, &p, 0);
-
-    if ( virt_base == 0 )
-    {
-        ERROR("Malformed ELF image. VIRT_BASE in '__xen_guest' section set 
incorrectly");
-        return -EINVAL;
-    }
+    if ( (p = strstr(guestinfo, "VIRT_BASE=")) == NULL )
+    {
+        ERROR("Malformed ELF image. No VIRT_BASE specified");
+        return -EINVAL;
+    }
+
+    virt_base = strtoul(p+10, &p, 0);
 
     dsi->elf_paddr_offset = virt_base;
     if ( (p = strstr(guestinfo, "ELF_PADDR_OFFSET=")) != NULL )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.