summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/nwfs/nwfs.h1
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c5
-rw-r--r--sys/nwfs/nwfs.h1
-rw-r--r--sys/nwfs/nwfs_vnops.c5
4 files changed, 10 insertions, 2 deletions
diff --git a/sys/fs/nwfs/nwfs.h b/sys/fs/nwfs/nwfs.h
index 950d18a..51ae76b 100644
--- a/sys/fs/nwfs/nwfs.h
+++ b/sys/fs/nwfs/nwfs.h
@@ -35,6 +35,7 @@
#ifndef _NWFS_H_
#define _NWFS_H_
+#include <netncp/ncp.h>
#include <nwfs/nwfs_mount.h>
#define NR_OPEN 0
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index 61163b0..d084503 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -1043,8 +1043,11 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_flag & VROOT, (int)flags & ISDOTDO
fap = &fattr;
notfound = ncp_lookup(dvp, cnp->cn_namelen, cnp->cn_nameptr,
fap, p, cnp->cn_cred);
- fid.f_parent = dnp->n_fid.f_id;
fid.f_id = fap->dirEntNum;
+ if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+ fid.f_parent = dnp->n_fid.f_parent;
+ } else
+ fid.f_parent = dnp->n_fid.f_id;
NCPVNDEBUG("call to ncp_lookup returned=%d\n",notfound);
}
if (notfound && notfound < 0x80 )
diff --git a/sys/nwfs/nwfs.h b/sys/nwfs/nwfs.h
index 950d18a..51ae76b 100644
--- a/sys/nwfs/nwfs.h
+++ b/sys/nwfs/nwfs.h
@@ -35,6 +35,7 @@
#ifndef _NWFS_H_
#define _NWFS_H_
+#include <netncp/ncp.h>
#include <nwfs/nwfs_mount.h>
#define NR_OPEN 0
diff --git a/sys/nwfs/nwfs_vnops.c b/sys/nwfs/nwfs_vnops.c
index 61163b0..d084503 100644
--- a/sys/nwfs/nwfs_vnops.c
+++ b/sys/nwfs/nwfs_vnops.c
@@ -1043,8 +1043,11 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_flag & VROOT, (int)flags & ISDOTDO
fap = &fattr;
notfound = ncp_lookup(dvp, cnp->cn_namelen, cnp->cn_nameptr,
fap, p, cnp->cn_cred);
- fid.f_parent = dnp->n_fid.f_id;
fid.f_id = fap->dirEntNum;
+ if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+ fid.f_parent = dnp->n_fid.f_parent;
+ } else
+ fid.f_parent = dnp->n_fid.f_id;
NCPVNDEBUG("call to ncp_lookup returned=%d\n",notfound);
}
if (notfound && notfound < 0x80 )
OpenPOWER on IntegriCloud