diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-07-28 21:54:57 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-07-28 21:54:57 +0000 |
commit | 0658bb8ef87f0511bcc282526ca4529f521db048 (patch) | |
tree | 382896a8ecc11b588b13ee046bb420127036553a /sys/nfsclient | |
parent | 742b7f01d2b9150eeba81508412df58ad1dc2dd9 (diff) | |
download | src-0658bb8ef87f0511bcc282526ca4529f521db048.tar.gz src-0658bb8ef87f0511bcc282526ca4529f521db048.zip |
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).
Notes
Notes:
svn path=/head/; revision=132808
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 2132ef581689..bdc98d2fbd7c 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 51b34d3c6b7f..212a1650632b 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 + |