If we get passed a filename (from the command line or default "netbsd"),

pass it to the BOOTP server in the "filename" field.
(as the "netboot" bootROMs already did)
So the user can easily switch between different kernels/configurations.
This commit is contained in:
drochner 2003-03-11 18:32:59 +00:00
parent dd15fa8102
commit a82c138b1c
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: devopen.c,v 1.2 2002/02/17 20:14:08 thorpej Exp $ */
/* $NetBSD: devopen.c,v 1.3 2003/03/11 18:32:59 drochner Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@ -37,6 +37,9 @@
#include <sys/param.h>
#include <stand.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <net.h>
#include <libi386.h>
#ifdef _STANDALONE
@ -50,7 +53,6 @@
#ifdef _STANDALONE
struct btinfo_bootpath bibp;
extern char bootfile[];
#endif
/*
@ -79,6 +81,10 @@ devopen(struct open_file *f, const char *fname, char **file)
/* Set the default boot file system. */
bcopy(pxeboot_fstab[0].fst_ops, file_system, sizeof(struct fs_ops));
/* if we got passed a filename, pass it to the BOOTP server */
if (fname)
strncpy(bootfile, fname, FNAME_SIZE);
/* Open the device; this might give us a boot file name. */
error = (*dp->dv_open)(f, NULL);
if (error)