Author: stepan Date: 2007-06-30 00:15:24 +0200 (Sat, 30 Jun 2007) New Revision: 421
Modified: LinuxBIOSv3/arch/x86/stage1.c LinuxBIOSv3/lib/lar.c Log: fix lar code to return 1 when the file is not found. (trivial)
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: LinuxBIOSv3/arch/x86/stage1.c =================================================================== --- LinuxBIOSv3/arch/x86/stage1.c 2007-06-29 20:25:30 UTC (rev 420) +++ LinuxBIOSv3/arch/x86/stage1.c 2007-06-29 22:15:24 UTC (rev 421) @@ -101,7 +101,7 @@ // FIXME this should be defined in the VPD area // but NOT IN THE CODE. - archive.len=(CONFIG_LINUXBIOS_ROMSIZE_KB-16)*1024; + archive.len=(CONFIG_LINUXBIOS_ROMSIZE_KB)*1024; archive.start=(void *)(0UL-(CONFIG_LINUXBIOS_ROMSIZE_KB*1024));
// FIXME check integrity
Modified: LinuxBIOSv3/lib/lar.c =================================================================== --- LinuxBIOSv3/lib/lar.c 2007-06-29 20:25:30 UTC (rev 420) +++ LinuxBIOSv3/lib/lar.c 2007-06-29 22:15:24 UTC (rev 421) @@ -40,7 +40,7 @@ archive->len);
for (walk = archive->start; - walk < (char *)archive->start + archive->len - 1; walk += 16) { + (walk - 1) < (char *)(archive->start + archive->len - 1 ); walk += 16) { if (strcmp(walk, MAGIC) != 0) continue;