From dbfec8f0640c52fb229272b795a1010dc01448da Mon Sep 17 00:00:00 2001 From: Greg Watson Date: Sun, 2 Nov 2003 17:06:52 +0000 Subject: copied for i386 git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1246 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/ppc/boot/linuxbios_table.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/arch/ppc/boot/linuxbios_table.c b/src/arch/ppc/boot/linuxbios_table.c index 731ddaf78a..3b14488de8 100644 --- a/src/arch/ppc/boot/linuxbios_table.c +++ b/src/arch/ppc/boot/linuxbios_table.c @@ -1,8 +1,8 @@ +#include #include #include #include #include "linuxbios_table.h" -#include #include #include @@ -115,17 +115,15 @@ void lb_strings(struct lb_header *header) { LB_TAG_LINKER, linuxbios_linker, }, { LB_TAG_ASSEMBLER, linuxbios_assembler, }, }; - int i; + unsigned int i; for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { - struct lb_record *rec; - struct lb_string *str; + struct lb_string *rec; size_t len; - rec = lb_new_record(header); - str = (struct lb_string *)rec; + rec = (struct lb_string *)lb_new_record(header); len = strlen(strings[i].string); - str->tag = strings[i].tag; - str->size = (sizeof(*rec) + len + 1 + 3) & ~3; - memcpy(str->string, strings[i].string, len+1); + rec->tag = strings[i].tag; + rec->size = (sizeof(*rec) + len + 1 + 3) & ~3; + memcpy(rec->string, strings[i].string, len+1); } } @@ -229,9 +227,7 @@ unsigned long write_linuxbios_table( struct mem_range *ramp; struct lb_header *head; struct lb_memory *mem; -#if HAVE_OPTION_TABLE == 1 struct lb_record *rec_dest, *rec_src; -#endif head = lb_table_init(low_table_end); low_table_end = (unsigned long)head; -- cgit v1.2.3