On 28.08.2007 18:19, ron minnich wrote: > On 8/28/07, Carl-Daniel Hailfinger <[EMAIL PROTECTED]> wrote: > >> lib/lar.c and util/lar/example.c differ in subtle ways in find_file. >> Inverted logic in one file, bogus calculations in the other one. We >> might want to make sure they behave the same way.
This still applies. However, it can be fixed in another commit. >>> walk += (ntohl(header->len) + ntohl(header->offset) - >>> 1) & 0xfffffff0; >> ARGH! Shouldn't that be >> >> walk += (ntohl(header->len) + ntohl(header->offset) + 15) & 0xfffffff0; > > OK, I added this to the code: > if (strcmp(&walk[0], "LARCHIVE") != 0) > continue; > before the other fix I created. It dies: > LinuxBIOS-3.0.0 Tue Aug 28 08:21:43 PDT 2007 starting... > Choosing fallback boot. > LAR: Attempting to open 'fallback/initram'. > LAR: Start 0xfff00000 len 0x100000 > LAR: search for normal/payload > LAR: search for normal/option_table > LAR: search for normal/stage2 > LAR: search for normal/initram > LAR: search for %s @ %p > > So I put in your fix (replace -1 with +15) Yes, I just reread that code and have to agree my +15 solution was not the right one. Maybe we could add some debug printing to find out where the code is looking for MAGIC, but I'd leave that to a later patch. > And it is worse: > LinuxBIOS-3.0.0 Tue Aug 28 08:21:43 PDT 2007 starting... > Choosing fallback boot. > LAR: Attempting to open 'fallback/initram'. > LAR: Start 0xfff00000 len 0x100000 > LAR: search for normal/payload > LAR: search for normal/stage2 > LAR: search for %s @ %p > > > So, how about we leave my patch in for now while I try to track this > nasty bug down? Agreed. Regards, Carl-Daniel -- linuxbios mailing list [email protected] http://www.linuxbios.org/mailman/listinfo/linuxbios
