From 8f6e088214238bc4616b1de5b7f9dcfc33aef1c9 Mon Sep 17 00:00:00 2001 From: drochner Date: Tue, 5 Dec 2000 17:59:43 +0000 Subject: [PATCH] add a kernel configuration option to set the string passed in bp_file in diskless BOOTP/DHCP configuration - good for booting different userland versions depending on the kernel version --- sys/conf/files | 3 ++- sys/nfs/nfs_bootdhcp.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index ab094a012704..ceb8a3d62863 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.407 2000/12/02 20:43:08 scw Exp $ +# $NetBSD: files,v 1.408 2000/12/05 17:59:43 drochner Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -20,6 +20,7 @@ defopt opt_sysvparam.h SHMMAXPGS SEMMNI SEMMNS SEMUME SEMMNU defopt opt_ntp.h PPS_SYNC NTP defopt opt_nfs_boot.h NFS_BOOT_BOOTP NFS_BOOT_BOOTPARAM NFS_BOOT_DHCP + NFS_BOOT_BOOTP_REQFILE NFS_BOOT_GATEWAY NFS_BOOT_TCP NFS_BOOT_OPTIONS NFS_BOOT_RWSIZE defopt opt_nfs.h NFS_V2_ONLY diff --git a/sys/nfs/nfs_bootdhcp.c b/sys/nfs/nfs_bootdhcp.c index b855daf67d84..e42af7f5ab2f 100644 --- a/sys/nfs/nfs_bootdhcp.c +++ b/sys/nfs/nfs_bootdhcp.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bootdhcp.c,v 1.15 2000/05/28 07:01:09 gmcgarry Exp $ */ +/* $NetBSD: nfs_bootdhcp.c,v 1.16 2000/12/05 17:59:43 drochner Exp $ */ /*- * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc. @@ -547,6 +547,9 @@ bootpc_call(nd, procp) bootp->bp_hlen = halen; /* Hardware address length */ bootp->bp_xid = ++xid; memcpy(bootp->bp_chaddr, haddr, halen); +#ifdef NFS_BOOT_BOOTP_REQFILE + strncpy(bootp->bp_file, NFS_BOOT_BOOTP_REQFILE, sizeof(bootp->bp_file)); +#endif /* Fill-in the vendor data. */ memcpy(bootp->bp_vend, vm_rfc1048, 4); #ifdef NFS_BOOT_DHCP