nfs: Simplify parameters saved for fstat()
This commit is contained in:
parent
6bcace62a8
commit
191fb658d0
|
@ -75,7 +75,7 @@ struct nfsnode
|
|||
uint8_t n_fhsize; /* Size in bytes of the file handle */
|
||||
uint8_t n_flags; /* Node flags */
|
||||
uint16_t n_mode; /* File mode for fstat() */
|
||||
struct timespec n_mtime; /* File modification time */
|
||||
time_t n_mtime; /* File modification time */
|
||||
time_t n_ctime; /* File creation time */
|
||||
nfsfh_t n_fhandle; /* NFS File Handle */
|
||||
uint64_t n_size; /* Current size of file */
|
||||
|
|
|
@ -586,7 +586,9 @@ void nfs_attrupdate(FAR struct nfsnode *np, FAR struct nfs_fattr *attributes)
|
|||
np->n_mode = fxdr_unsigned(uint16_t, attributes->fa_mode);
|
||||
np->n_size = fxdr_hyper(&attributes->fa_size);
|
||||
|
||||
fxdr_nfsv3time(&attributes->fa_mtime, &np->n_mtime);
|
||||
fxdr_nfsv3time(&attributes->fa_mtime, &ts);
|
||||
np->n_mtime = ts.tv_sec;
|
||||
|
||||
fxdr_nfsv3time(&attributes->fa_ctime, &ts);
|
||||
np->n_ctime = ts.tv_sec;
|
||||
}
|
||||
|
|
|
@ -1245,7 +1245,7 @@ static int nfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
|
|||
|
||||
/* Extract time values as type time_t in units of seconds. */
|
||||
|
||||
info.ns_mtime = np->n_mtime.tv_sec;
|
||||
info.ns_mtime = np->n_mtime;
|
||||
info.ns_ctime = np->n_ctime;
|
||||
|
||||
/* Use the current time for the time of last access. */
|
||||
|
|
Loading…
Reference in New Issue