From: mickey Date: Tue, 15 Apr 1997 20:50:35 +0000 (+0000) Subject: pass bootdev to kernel... X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dbf68ae54ae5c9cce1d0aae4f370b534ed7765c0;p=openbsd pass bootdev to kernel... all the future devices have to copy it into global var... in the current state i can boot any kernel i have.... testers? --- diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index a73ffd9ead4..e02b7d641e9 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.6 1997/04/15 06:25:18 mickey Exp $ */ +/* $OpenBSD: biosdev.c,v 1.7 1997/04/15 20:50:35 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -116,7 +116,8 @@ biosopen(struct open_file *f, ...) bd = alloc(sizeof(*bd)); bzero(bd, sizeof(bd)); - bd->bsddev = MAKEBOOTDEV(maj, 0, 0, unit, part); + /* XXX for exec stuff */ + bootdev = bd->bsddev = MAKEBOOTDEV(maj, 0, 0, unit, part); switch (maj) { case 0: /* wd */ diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index 61451c487cb..d2c4f751efc 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.7 1997/04/15 20:01:56 mickey Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.8 1997/04/15 20:50:36 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -39,7 +39,7 @@ #include #include -static int bootdev; +dev_t bootdev; #define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1)) diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h index e68e9264874..d0b02994d47 100644 --- a/sys/arch/i386/stand/libsa/libsa.h +++ b/sys/arch/i386/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.4 1997/04/06 19:52:46 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.5 1997/04/15 20:50:36 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -40,5 +40,7 @@ void devboot __P((dev_t, char *)); extern u_long codeseg; extern int boothowto; + /* XXX filled in assumption that last file opened is kernel */ +extern int bootdev; extern u_int cnvmem, extmem; extern const char bdevs[19][4];