summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2001-03-06 09:59:18 +0000
committerbp <bp@FreeBSD.org>2001-03-06 09:59:18 +0000
commit342407e6c4d6839281677eaeafc47228778a20f7 (patch)
treef08a390bdb93d3e75cf1f4f1bf68f64911c14ff9 /sys/fs/nwfs
parenta0c9a8a6926be1f0f5febeb8e548d17463aafccb (diff)
downloadFreeBSD-src-342407e6c4d6839281677eaeafc47228778a20f7.zip
FreeBSD-src-342407e6c4d6839281677eaeafc47228778a20f7.tar.gz
A name of the file can change while its id stays the same. So, we have
to update it as well. Remove unused function.
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_node.c4
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c16
2 files changed, 5 insertions, 15 deletions
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c
index 2025191..4051d11 100644
--- a/sys/fs/nwfs/nwfs_node.c
+++ b/sys/fs/nwfs/nwfs_node.c
@@ -285,6 +285,9 @@ nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi)
struct vattr *va = &np->n_vattr;
va->va_type = vp->v_type; /* vnode type (for create) */
+ np->n_nmlen = fi->nameLen;
+ bcopy(fi->entryName, np->n_name, np->n_nmlen);
+ np->n_name[fi->nameLen] = 0;
if (vp->v_type == VREG) {
if (va->va_size != fi->dataStreamSize) {
va->va_size = fi->dataStreamSize;
@@ -321,6 +324,7 @@ nwfs_attr_cacheenter(struct vnode *vp, struct nw_entry_info *fi)
np->n_mtime = va->va_mtime.tv_sec;
}
np->n_atime = time_second;
+ np->n_dosfid = fi->DosDirNum;
return;
}
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index 93fe639..2b42ec6 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2000 Boris Popov
+ * Copyright (c) 1999, 2000, 2001 Boris Popov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -124,14 +124,6 @@ static struct vnodeopv_desc nwfs_vnodeop_opv_desc =
VNODEOP_SET(nwfs_vnodeop_opv_desc);
-void nwfs_createname(char *_name,struct vnode *vp,struct componentname *cnp);
-
-
-void nwfs_createname(char *_name,struct vnode *vp,struct componentname *cnp){
- strncpy(_name, cnp->cn_nameptr, cnp->cn_namelen);
- _name[cnp->cn_namelen] = '\0';
- ncp_str_upper(_name);
-}
/*
* nwfs_access vnode op
* for now just return ok
@@ -880,13 +872,7 @@ nwfs_nget(struct mount *mp, ncpfid fid, struct nw_entry_info *fap,
return error;
newnp = VTONW(vp);
if (fap) {
- if (newnp->n_flag & NNEW) {
- newnp->n_nmlen = fap->nameLen;
- bcopy(fap->entryName, newnp->n_name, newnp->n_nmlen);
- newnp->n_name[fap->nameLen] = 0;
- }
newnp->n_attr = fap->attributes;
- newnp->n_dosfid = fap->DosDirNum;
vp->v_type = newnp->n_attr & aDIR ? VDIR : VREG;
nwfs_attr_cacheenter(vp, fap);
}
OpenPOWER on IntegriCloud