Module Name:    src
Committed By:   chs
Date:           Sun Mar 21 00:10:40 UTC 2010

Modified Files:
        src/sys/nfs: nfs_bootparam.c

Log Message:
in nfs_bootparam(), set the corresponding flag for each field that we fill in.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/nfs/nfs_bootparam.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_bootparam.c
diff -u src/sys/nfs/nfs_bootparam.c:1.36 src/sys/nfs/nfs_bootparam.c:1.37
--- src/sys/nfs/nfs_bootparam.c:1.36	Tue Mar  2 23:19:09 2010
+++ src/sys/nfs/nfs_bootparam.c	Sun Mar 21 00:10:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bootparam.c,v 1.36 2010/03/02 23:19:09 pooka Exp $	*/
+/*	$NetBSD: nfs_bootparam.c,v 1.37 2010/03/21 00:10:40 chs Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_bootparam.c,v 1.36 2010/03/02 23:19:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_bootparam.c,v 1.37 2010/03/21 00:10:40 chs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs_boot.h"
@@ -178,6 +178,7 @@
 		printf("nfs_boot: bootparam whoami, error=%d\n", error);
 		goto delout;
 	}
+	*flags |= NFS_BOOT_HAS_SERVADDR | NFS_BOOT_HAS_SERVER;
 	printf("nfs_boot: server_addr=%s\n", inet_ntoa(sin->sin_addr));
 	printf("nfs_boot: hostname=%s\n", hostname);
 
@@ -190,6 +191,7 @@
 		printf("nfs_boot: bootparam get root: %d\n", error);
 		goto delout;
 	}
+	*flags |= NFS_BOOT_HAS_ROOTPATH;
 
 #ifndef NFS_BOOTPARAM_NOGATEWAY
 	gw_ndm = kmem_alloc(sizeof(*gw_ndm), KM_SLEEP);
@@ -208,6 +210,7 @@
 	printf("nfs_boot: gateway=%s\n", inet_ntoa(sin->sin_addr));
 	/* Just save it.  Caller adds the route. */
 	nd->nd_gwip = sin->sin_addr;
+	*flags |= NFS_BOOT_HAS_GWIP;
 
 	/* Look for a mask string after the colon. */
 	p = strchr(gw_ndm->ndm_host, ':');
@@ -221,6 +224,7 @@
 
 	/* Have a netmask too!  Save it; update the I/F. */
 	nd->nd_mask.s_addr = mask;
+	*flags |= NFS_BOOT_HAS_MASK;
 	printf("nfs_boot: my_mask=%s\n", inet_ntoa(nd->nd_mask));
 	(void)  nfs_boot_deladdress(ifp, lwp, my_ip.s_addr);
 	error = nfs_boot_setaddress(ifp, lwp, my_ip.s_addr,
@@ -248,6 +252,7 @@
 	if (gw_ip.s_addr) {
 		/* Our caller will add the route. */
 		nd->nd_gwip = gw_ip;
+		*flags |= NFS_BOOT_HAS_GWIP;
 	}
 #endif
 

Reply via email to