diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-08-23 16:08:21 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-08-23 16:08:21 +0000 |
commit | ffec5f3ab794167126c28e7253dbe9d7de676dc2 (patch) | |
tree | 1645417f11a24ea1a316a7959246f5c4af75e789 /lbtable.c | |
parent | fd37414dbb1996f91b07b08826e637c29c455c37 (diff) | |
download | ast2050-flashrom-ffec5f3ab794167126c28e7253dbe9d7de676dc2.zip ast2050-flashrom-ffec5f3ab794167126c28e7253dbe9d7de676dc2.tar.gz |
Cosmetic fixes
Corresponding to flashrom svn r130 and coreboot v2 svn r2748.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'lbtable.c')
-rw-r--r-- | lbtable.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -44,6 +44,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length) } value; unsigned long sum; unsigned long i; + /* In the most straight forward way possible, * compute an ip style checksum. */ @@ -64,6 +65,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length) } value.byte[0] = sum & 0xff; value.byte[1] = (sum >> 8) & 0xff; + return (~value.word) & 0xFFFF; } @@ -78,10 +80,12 @@ static int count_lb_records(struct lb_header *head) { struct lb_record *rec; int count; + count = 0; for_each_lbrec(head, rec) { count++; } + return count; } @@ -89,6 +93,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start, unsigned long end) { unsigned long addr; + /* For now be stupid.... */ for (addr = start; addr < end; addr += 16) { struct lb_header *head = @@ -123,6 +128,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start, return head; }; + return 0; } @@ -131,6 +137,7 @@ static void find_mainboard(struct lb_record *ptr, unsigned long addr) struct lb_mainboard *rec; int max_size; char vendor[256], part[256]; + rec = (struct lb_mainboard *)ptr; max_size = rec->size - sizeof(*rec); printf("vendor id: %.*s part id: %.*s\n", @@ -206,5 +213,6 @@ int linuxbios_init(void) printf("No LinuxBIOS table found.\n"); return -1; } + return 0; } |