From 342407e6c4d6839281677eaeafc47228778a20f7 Mon Sep 17 00:00:00 2001 From: bp Date: Tue, 6 Mar 2001 09:59:18 +0000 Subject: A name of the file can change while its id stays the same. So, we have to update it as well. Remove unused function. --- sys/fs/nwfs/nwfs_node.c | 4 ++++ sys/fs/nwfs/nwfs_vnops.c | 16 +--------------- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'sys/fs/nwfs') 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); } -- cgit v1.1