The original version of this patch was bogus, here is what
it should have looked like:

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


kexec-tool: i386: Only load known segments

This was a warning flagged by the compiler, that loadaddr
may be used uninitilised. I'm not sure if this happens in practice,
but it is possible, if the seg type is NBI_SEG_NEGATIVE, or
some other undefined value.

It seems best to print a warning and skip to the next segment in
this case. But I'm not sure if this is correct.

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

Index: kexec-tools-build-unstable/kexec/arch/i386/kexec-nbi.c
===================================================================
--- kexec-tools-build-unstable.orig/kexec/arch/i386/kexec-nbi.c 2006-09-25 
12:32:10.000000000 +0900
+++ kexec-tools-build-unstable/kexec/arch/i386/kexec-nbi.c      2006-09-25 
12:32:12.000000000 +0900
@@ -216,6 +216,11 @@
                else if ((seg.flags & NBI_SEG) == NBI_SEG_PREPEND) {
                        loadaddr = last0 - seg.loadaddr;
                }
+               else {
+                       printf("warning: unhandled segment of type %0x\n",
+                               seg.flags & NBI_SEG);
+                       continue;
+               }
                add_segment(info, buf + file_off, seg.imglength,
                        loadaddr, seg.memlength);
                last0 = loadaddr;

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to