mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
A name of the file can change while its id stays the same. So, we have
to update it as well. Remove unused function.
This commit is contained in:
parent
e0db7375ba
commit
1cebc48fb3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73871
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user