summaryrefslogtreecommitdiff
path: root/util/flashrom/lbtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/flashrom/lbtable.c')
-rw-r--r--util/flashrom/lbtable.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/flashrom/lbtable.c b/util/flashrom/lbtable.c
index 004e61cd9d..57cc766948 100644
--- a/util/flashrom/lbtable.c
+++ b/util/flashrom/lbtable.c
@@ -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;
}