diff options
-rw-r--r-- | plpnfsd/main.cc | 6 | ||||
-rw-r--r-- | plpnfsd/mp_inode.c | 4 | ||||
-rw-r--r-- | plpnfsd/rfsv_api.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/plpnfsd/main.cc b/plpnfsd/main.cc index e7e3640..89010fe 100644 --- a/plpnfsd/main.cc +++ b/plpnfsd/main.cc @@ -216,7 +216,7 @@ long rfsv_dir(const char *file, dentry **e) { if (!a) return -1; ret = a->dir(file, entries); - + for (int i = 0; i < entries.size(); i++) { PlpDirent pe = entries[i]; tmp = *e; @@ -279,7 +279,7 @@ long rfsv_fclose(long handle) { return a->fclose(handle); } -long rfsv_fcreate(long attr, const char *file, long *handle) { +long rfsv_fcreate(long attr, const char *file, u_int32_t *handle) { u_int32_t ph; long ret; @@ -394,7 +394,7 @@ long rfsv_setattr(const char *name, long sattr, long dattr) { long rfsv_getattr(const char *name, long *attr, long *size, long *time) { long res; PlpDirent e; - + if (!a) return -1; res = a->fgeteattr(name, e); diff --git a/plpnfsd/mp_inode.c b/plpnfsd/mp_inode.c index a78c779..6fec6df 100644 --- a/plpnfsd/mp_inode.c +++ b/plpnfsd/mp_inode.c @@ -174,8 +174,10 @@ unsigned inode; if (debug) debuglog("search_cache %d\n", inode); for (cp = root; cp; cp = cp->next) - if (cp->inode == inode) + if (cp->inode == inode) { + cp->stamp = time(0); return cp; + } return 0; } diff --git a/plpnfsd/rfsv_api.h b/plpnfsd/rfsv_api.h index 5a9072e..cd98beb 100644 --- a/plpnfsd/rfsv_api.h +++ b/plpnfsd/rfsv_api.h @@ -17,7 +17,7 @@ extern long rfsv_rmdir(const char *name); extern long rfsv_remove(const char *name); extern long rfsv_rename(const char *oldname, const char *newname); extern long rfsv_fclose(long handle); -extern long rfsv_fcreate(long attr, const char *name, long *handle); +extern long rfsv_fcreate(long attr, const char *name, u_int32_t *handle); extern long rfsv_read(char *buf, long offset, long len, char *name); extern long rfsv_write(char *buf, long offset, long len, char *name); extern long rfsv_getattr(const char *name, long *attr, long *size, long *time); |