From 1c337dcffe07b9f3ace03a473f86d5618e46b744 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 3 May 1997 13:42:50 +0000 Subject: [PATCH] Make nfs roots (diskless) functional again. It may still not be correct, but it is functional. --- sys/nfs/nfs_vfsops.c | 6 +++++- sys/nfsclient/nfs_vfsops.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index aee1ca29b65..7a14a5b6807 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.37 1997/04/04 17:49:30 dfr Exp $ + * $Id: nfs_vfsops.c,v 1.38 1997/04/22 17:38:01 dfr Exp $ */ #include @@ -577,6 +577,10 @@ nfs_mount(mp, path, data, ndp, p) u_int len; u_char nfh[NFSX_V3FHMAX]; + if (path == NULL) { + nfs_mountroot(); + return (0); + } error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args)); if (error) return (error); diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index aee1ca29b65..7a14a5b6807 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.37 1997/04/04 17:49:30 dfr Exp $ + * $Id: nfs_vfsops.c,v 1.38 1997/04/22 17:38:01 dfr Exp $ */ #include @@ -577,6 +577,10 @@ nfs_mount(mp, path, data, ndp, p) u_int len; u_char nfh[NFSX_V3FHMAX]; + if (path == NULL) { + nfs_mountroot(); + return (0); + } error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args)); if (error) return (error); -- 2.45.2