diff options
author | bz <bz@FreeBSD.org> | 2009-12-13 11:06:39 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-12-13 11:06:39 +0000 |
commit | 1ba3a5e4e0b1a21dd0c00df2e5223a60984e3de6 (patch) | |
tree | 00204cde270af98c99229eba8ad58f16ebfb498a /sys/nfsclient/krpc_subr.c | |
parent | 1d2fa620269999c2637ae14c857ca41f60523cde (diff) | |
download | FreeBSD-src-1ba3a5e4e0b1a21dd0c00df2e5223a60984e3de6.zip FreeBSD-src-1ba3a5e4e0b1a21dd0c00df2e5223a60984e3de6.tar.gz |
Add a few more V_hacks to nfsclient to allow machines with a VIMAGE
kernel to boot from NFS. [1]
Note: this is not a full virtualization of nfsclient. It is only does
what advertised above and nothing more.
Requested by: public demand [1]
Tested by: kris, ..
MFC after: 5 days
Diffstat (limited to 'sys/nfsclient/krpc_subr.c')
-rw-r--r-- | sys/nfsclient/krpc_subr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index 996cb05..7e4130f 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$"); #include <sys/uio.h> #include <net/if.h> +#include <net/vnet.h> + #include <netinet/in.h> #include <rpc/types.h> @@ -213,6 +215,8 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, nam = mhead = NULL; from = NULL; + CURVNET_SET(TD_TO_VNET(td)); + /* * Create socket and set its recieve timeout. */ @@ -425,6 +429,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, if (mhead) m_freem(mhead); if (from) free(from, M_SONAME); soclose(so); + CURVNET_RESTORE(); return error; } |