diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-12 16:11:31 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-12 16:11:31 +0000 |
commit | 7f63dd840feea2cce7e55ad8bc4e1e98d23ede87 (patch) | |
tree | eb7dfcf5b90bab0d33944737b9a0e190245469fd /nuttx/fs/nfs/nfs_util.c | |
parent | c5af86030963729f5b208777284c01bb394a5d39 (diff) | |
download | px4-nuttx-7f63dd840feea2cce7e55ad8bc4e1e98d23ede87.tar.gz px4-nuttx-7f63dd840feea2cce7e55ad8bc4e1e98d23ede87.tar.bz2 px4-nuttx-7f63dd840feea2cce7e55ad8bc4e1e98d23ede87.zip |
Fix PL2303 typo checked in a long time ago; NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4832 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_util.c')
-rw-r--r-- | nuttx/fs/nfs/nfs_util.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nuttx/fs/nfs/nfs_util.c b/nuttx/fs/nfs/nfs_util.c index 8a3a1e579..d489a839c 100644 --- a/nuttx/fs/nfs/nfs_util.c +++ b/nuttx/fs/nfs/nfs_util.c @@ -616,3 +616,24 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, } } } + +/**************************************************************************** + * Name: nfs_attrupdate + * + * Desciption: + * Update file attributes on write or after the file is modified. + * + * Return Value: + * None. + * + ****************************************************************************/ + +void nfs_attrupdate(FAR struct nfsnode *np, FAR struct nfs_fattr *attributes) +{ + /* Save a few of the files attribute values in file structur (host order) */ + + np->n_type = fxdr_unsigned(uint32_t, attributes->fa_type); + np->n_size = fxdr_hyper(&attributes->fa_size); + fxdr_nfsv3time(&attributes->fa_mtime, &np->n_mtime) + np->n_ctime = fxdr_hyper(&attributes->fa_ctime); +} |