mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
fs/nfs: Support 64bit file length
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
c4742c2197
commit
7a60efab35
+4
-4
@@ -116,7 +116,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp,
|
|||||||
FAR struct nfsnode *np, FAR const char *relpath,
|
FAR struct nfsnode *np, FAR const char *relpath,
|
||||||
mode_t mode);
|
mode_t mode);
|
||||||
static int nfs_filetruncate(FAR struct nfsmount *nmp,
|
static int nfs_filetruncate(FAR struct nfsmount *nmp,
|
||||||
FAR struct nfsnode *np, uint32_t length);
|
FAR struct nfsnode *np, off_t length);
|
||||||
static int nfs_fileopen(FAR struct nfsmount *nmp,
|
static int nfs_fileopen(FAR struct nfsmount *nmp,
|
||||||
FAR struct nfsnode *np, FAR const char *relpath,
|
FAR struct nfsnode *np, FAR const char *relpath,
|
||||||
int oflags, mode_t mode);
|
int oflags, mode_t mode);
|
||||||
@@ -389,7 +389,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp, FAR struct nfsnode *np,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int nfs_filetruncate(FAR struct nfsmount *nmp,
|
static int nfs_filetruncate(FAR struct nfsmount *nmp,
|
||||||
FAR struct nfsnode *np, uint32_t length)
|
FAR struct nfsnode *np, off_t length)
|
||||||
{
|
{
|
||||||
FAR uint32_t *ptr;
|
FAR uint32_t *ptr;
|
||||||
int reqlen;
|
int reqlen;
|
||||||
@@ -417,8 +417,8 @@ static int nfs_filetruncate(FAR struct nfsmount *nmp,
|
|||||||
*ptr++ = nfs_false; /* Don't change uid */
|
*ptr++ = nfs_false; /* Don't change uid */
|
||||||
*ptr++ = nfs_false; /* Don't change gid */
|
*ptr++ = nfs_false; /* Don't change gid */
|
||||||
*ptr++ = nfs_true; /* Use the following size */
|
*ptr++ = nfs_true; /* Use the following size */
|
||||||
*ptr++ = 0;
|
*ptr++ = txdr_unsigned(length >> 32); /* Truncate to the specified length */
|
||||||
*ptr++ = txdr_unsigned(length); /* Truncate to the specified length */
|
*ptr++ = txdr_unsigned(length);
|
||||||
*ptr++ = HTONL(NFSV3SATTRTIME_TOSERVER); /* Use the server's time */
|
*ptr++ = HTONL(NFSV3SATTRTIME_TOSERVER); /* Use the server's time */
|
||||||
*ptr++ = HTONL(NFSV3SATTRTIME_TOSERVER); /* Use the server's time */
|
*ptr++ = HTONL(NFSV3SATTRTIME_TOSERVER); /* Use the server's time */
|
||||||
*ptr++ = nfs_false; /* No guard value */
|
*ptr++ = nfs_false; /* No guard value */
|
||||||
|
|||||||
Reference in New Issue
Block a user