diff options
author | phk <phk@FreeBSD.org> | 2004-07-28 21:54:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-28 21:54:57 +0000 |
commit | 98d8f3741c9752729a6684372287457a18580e7f (patch) | |
tree | 382896a8ecc11b588b13ee046bb420127036553a /sys/nfsclient | |
parent | 72ff15d7fb39222cff16cf948d64041a4bcc043f (diff) | |
download | FreeBSD-src-98d8f3741c9752729a6684372287457a18580e7f.zip FreeBSD-src-98d8f3741c9752729a6684372287457a18580e7f.tar.gz |
Move a relic to its correct location(s): Put nfs diskless initialization
calls with the code they call. (Yet another example of mindless copy&paste).
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 3 | ||||
-rw-r--r-- | sys/nfsclient/nfs_diskless.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 2132ef5..bdc98d2 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -1740,6 +1740,7 @@ bootpc_init(void) #endif } + rootdevnames[0] = "nfs:"; mountopts(&nd->root_args, NULL); for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next) @@ -1894,3 +1895,5 @@ out: m_freem(m); return error; } + +SYSINIT(bootp_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, bootpc_init, NULL); diff --git a/sys/nfsclient/nfs_diskless.c b/sys/nfsclient/nfs_diskless.c index 51b34d3..212a165 100644 --- a/sys/nfsclient/nfs_diskless.c +++ b/sys/nfsclient/nfs_diskless.c @@ -231,3 +231,17 @@ decode_nfshandle(char *ev, u_char *fh) } } } + +#if !defined(BOOTP_NFSROOT) +static void +nfs_rootconf(void) +{ + + nfs_setup_diskless(); + if (nfs_diskless_valid) + rootdevnames[0] = "nfs:"; +} + +SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, nfs_rootconf, NULL) +#endif + |