Put name of booted file into a "bootinfo" structure.
(not for DOS files for now, we don't know the absolute path)
This commit is contained in:
parent
38b36ed152
commit
23d58b46d3
|
@ -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 <lib/libsa/stand.h>
|
||||
#include <lib/libkern/libkern.h>
|
||||
#include <lib/libsa/ufs.h>
|
||||
|
||||
#include <libi386.h>
|
||||
#include <biosdisk.h>
|
||||
#include <dosfile.h>
|
||||
#include <bootinfo.h>
|
||||
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue