summaryrefslogtreecommitdiff
path: root/sys/stand/boot/bootarg.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
commit888b63e1743ef4b4277b88169301e0b5c1445e16 (patch)
tree5b9d1c51879f3e1f909c17e6ec7c2f6050ac92e1 /sys/stand/boot/bootarg.c
parentc2ee71fae9cec63f4a94c921619dc28d1c5b5032 (diff)
i386 bootblocks that work for 2.3. A tale too long to tell
Diffstat (limited to 'sys/stand/boot/bootarg.c')
-rw-r--r--sys/stand/boot/bootarg.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/stand/boot/bootarg.c b/sys/stand/boot/bootarg.c
index 642f1c8b317..efee8f52cc4 100644
--- a/sys/stand/boot/bootarg.c
+++ b/sys/stand/boot/bootarg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootarg.c,v 1.3 1997/10/25 06:58:48 mickey Exp $ */
+/* $OpenBSD: bootarg.c,v 1.4 1998/04/18 07:40:02 deraadt Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -35,7 +35,7 @@
#include <lib/libsa/stand.h>
#include <stand/boot/bootarg.h>
-static bootarg_t *list = NULL;
+bootarg_t *bootarg_list;
void
addbootarg(t, l, p)
@@ -48,8 +48,8 @@ addbootarg(t, l, p)
q->ba_type = t;
q->ba_size = sizeof(*q) + l - sizeof(q->ba_arg);
bcopy(p, q->ba_arg, l);
- q->ba_next = list;
- list = q;
+ q->ba_next = bootarg_list;
+ bootarg_list = q;
}
void
@@ -63,7 +63,7 @@ makebootargs(v, lenp)
/* get total size */
l = sizeof(*p);
- for (p = list; p != NULL; p = p->ba_next)
+ for (p = bootarg_list; p != NULL; p = p->ba_next)
l += p->ba_size;
if (*lenp < l) {
#ifdef DEBUG
@@ -73,7 +73,8 @@ makebootargs(v, lenp)
}
*lenp = l;
/* copy them out */
- for (p = list, q = v; p != NULL && ((q + p->ba_size) - (u_char*)v) < l;
+ for (p = bootarg_list, q = v;
+ p != NULL && ((q + p->ba_size) - (u_char*)v) < l;
q += p->ba_size, p = p->ba_next) {
#ifdef DEBUG
printf("%d,%d ", p->ba_type, p->ba_size);