Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/pxeboot If we get passed a filename (fro...



details:   https://anonhg.NetBSD.org/src/rev/2ec1d60aeeda
branches:  trunk
changeset: 544107:2ec1d60aeeda
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Mar 11 18:32:59 2003 +0000

description:
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.

diffstat:

 sys/arch/i386/stand/pxeboot/devopen.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 198fd12e4639 -r 2ec1d60aeeda sys/arch/i386/stand/pxeboot/devopen.c
--- a/sys/arch/i386/stand/pxeboot/devopen.c     Tue Mar 11 18:29:00 2003 +0000
+++ b/sys/arch/i386/stand/pxeboot/devopen.c     Tue Mar 11 18:32:59 2003 +0000
@@ -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 @@
        /* 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)



Home | Main Index | Thread Index | Old Index