From 23d58b46d313e7f4df3ce627b5f33aea52b3d98f Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 17 Sep 1997 18:40:33 +0000 Subject: [PATCH] Put name of booted file into a "bootinfo" structure. (not for DOS files for now, we don't know the absolute path) --- sys/arch/i386/stand/dosboot/devopen.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/stand/dosboot/devopen.c b/sys/arch/i386/stand/dosboot/devopen.c index 4051c702125b..ed0b0f0fe4d1 100644 --- a/sys/arch/i386/stand/dosboot/devopen.c +++ b/sys/arch/i386/stand/dosboot/devopen.c @@ -1,4 +1,4 @@ -/* $NetBSD: devopen.c,v 1.2 1997/03/22 09:06:18 thorpej Exp $ */ +/* $NetBSD: devopen.c,v 1.3 1997/09/17 18:40:33 drochner Exp $ */ /* * Copyright (c) 1996 @@ -33,11 +33,16 @@ #include +#include #include #include #include #include +#include + +extern int parsebootfile __P((const char *, char**, char**, unsigned int*, + unsigned int*, const char**)); struct devsw devsw[] = { {"disk", biosdiskstrategy, biosdiskopen, biosdiskclose, biosdiskioctl}, @@ -93,6 +98,8 @@ dev2bios(devname, unit, biosdev) return (ENXIO); } +struct btinfo_bootpath bibp; + int devopen(f, fname, file) struct open_file *f; @@ -120,6 +127,10 @@ devopen(f, fname, file) file_system[0] = ufsfs; /* structure assignment! */ dp = &devsw[0]; /* must be biosdisk */ f->f_dev = dp; + + strncpy(bibp.bootpath, *file, sizeof(bibp.bootpath)); + BI_ADD(&bibp, BTINFO_BOOTPATH, sizeof(bibp)); + return (biosdiskopen(f, biosdev, partition)); } else { printf("no file system\n");