ia64/xen-unstable
changeset 2411:46161d047e25
bitkeeper revision 1.1159.1.122 (41384ddcEDLEgoHoCYQuvXnUiQgwcw)
Allow loading other images besides Linux images.
Allow loading other images besides Linux images.
author | cl349@freefall.cl.cam.ac.uk |
---|---|
date | Fri Sep 03 10:56:28 2004 +0000 (2004-09-03) |
parents | 7ed44d755dda |
children | b3a8b4facc8f |
files | tools/libxc/xc_linux_build.c xen/common/elf.c |
line diff
1.1 --- a/tools/libxc/xc_linux_build.c Fri Sep 03 02:17:23 2004 +0000 1.2 +++ b/tools/libxc/xc_linux_build.c Fri Sep 03 10:56:28 2004 +0000 1.3 @@ -600,10 +600,18 @@ static int parseelfimage(char *elfbase, 1.4 1.5 guestinfo = elfbase + shdr->sh_offset; 1.6 1.7 - if ( (strstr(guestinfo, "GUEST_OS=linux") == NULL) || 1.8 - (strstr(guestinfo, "XEN_VER=2.0") == NULL) ) 1.9 + if ( (strstr(guestinfo, "LOADER=generic") == NULL) && 1.10 + (strstr(guestinfo, "GUEST_OS=linux") == NULL) ) 1.11 { 1.12 - ERROR("Will only load Linux images built for Xen v2.0"); 1.13 + ERROR("Will only load images built for the generic loader " 1.14 + "or Linux images"); 1.15 + ERROR("Actually saw: '%s'", guestinfo); 1.16 + return -EINVAL; 1.17 + } 1.18 + 1.19 + if ( (strstr(guestinfo, "XEN_VER=2.0") == NULL) ) 1.20 + { 1.21 + ERROR("Will only load images built for Xen v2.0"); 1.22 ERROR("Actually saw: '%s'", guestinfo); 1.23 return -EINVAL; 1.24 }
2.1 --- a/xen/common/elf.c Fri Sep 03 02:17:23 2004 +0000 2.2 +++ b/xen/common/elf.c Fri Sep 03 10:56:28 2004 +0000 2.3 @@ -68,10 +68,17 @@ int parseelfimage(char *elfbase, 2.4 guestinfo = elfbase + shdr->sh_offset; 2.5 printk("Xen-ELF header found: '%s'\n", guestinfo); 2.6 2.7 - if ( (strstr(guestinfo, "GUEST_OS=linux") == NULL) || 2.8 - (strstr(guestinfo, "XEN_VER=2.0") == NULL) ) 2.9 + if ( (strstr(guestinfo, "LOADER=generic") == NULL) && 2.10 + (strstr(guestinfo, "GUEST_OS=linux") == NULL) ) 2.11 { 2.12 - printk("ERROR: Xen will only load Linux built for Xen v2.0\n"); 2.13 + printk("ERROR: Xen will only load images built for the generic " 2.14 + "loader or Linux images\n"); 2.15 + return -EINVAL; 2.16 + } 2.17 + 2.18 + if ( (strstr(guestinfo, "XEN_VER=2.0") == NULL) ) 2.19 + { 2.20 + printk("ERROR: Xen will only load images built for Xen v2.0\n"); 2.21 return -EINVAL; 2.22 } 2.23