summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/nfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/boot/lib/libstand/nfs.c')
-rw-r--r--usr/src/boot/lib/libstand/nfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/boot/lib/libstand/nfs.c b/usr/src/boot/lib/libstand/nfs.c
index a31f449da8..f10abf1e26 100644
--- a/usr/src/boot/lib/libstand/nfs.c
+++ b/usr/src/boot/lib/libstand/nfs.c
@@ -461,6 +461,7 @@ nfs_readdata(struct nfs_iodesc *d, off_t off, void *addr, size_t len)
int
nfs_open(const char *upath, struct open_file *f)
{
+ struct devdesc *dev;
struct iodesc *desc;
struct nfs_iodesc *currfd = NULL;
char buf[2 * NFS_V3MAXFHSIZE + 3];
@@ -479,6 +480,7 @@ nfs_open(const char *upath, struct open_file *f)
if (netproto != NET_NFS)
return (EINVAL);
+ dev = f->f_devdata;
#ifdef NFS_DEBUG
if (debug)
printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath);
@@ -491,7 +493,7 @@ nfs_open(const char *upath, struct open_file *f)
if (f->f_dev->dv_type != DEVT_NET)
return (EINVAL);
- if (!(desc = socktodesc(*(int *)(f->f_devdata))))
+ if (!(desc = socktodesc(*(int *)(dev->d_opendata))))
return (EINVAL);
/* Bind to a reserved port. */