Source-Changes-HG archive

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

[src/trunk]: src/sys/nfs in nfs_bootparam(), set the corresponding flag for e...



details:   https://anonhg.NetBSD.org/src/rev/a28bb5e0b0a7
branches:  trunk
changeset: 753228:a28bb5e0b0a7
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Mar 21 00:10:40 2010 +0000

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

diffstat:

 sys/nfs/nfs_bootparam.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r 2e9116299df0 -r a28bb5e0b0a7 sys/nfs/nfs_bootparam.c
--- a/sys/nfs/nfs_bootparam.c   Sun Mar 21 00:10:14 2010 +0000
+++ b/sys/nfs/nfs_bootparam.c   Sun Mar 21 00:10:40 2010 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index