diff options
author | uwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2007-08-23 16:08:21 +0000 |
---|---|---|
committer | uwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2007-08-23 16:08:21 +0000 |
commit | 4e3d1ebdce084d0723c4aeb29e83abc2d6dd32d7 (patch) | |
tree | 1645417f11a24ea1a316a7959246f5c4af75e789 /lbtable.c | |
parent | 9823fd2c92e2bbb5f6374c9b6f6c1330424f6e69 (diff) | |
download | flashrom-4e3d1ebdce084d0723c4aeb29e83abc2d6dd32d7.tar.gz |
Original v2 revision: 2748
Cosmetic fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@130 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
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; } |