diff --git a/arch/sim/src/sim/posix/sim_hostfs.c b/arch/sim/src/sim/posix/sim_hostfs.c index 65927897dc..e60042d03f 100644 --- a/arch/sim/src/sim/posix/sim_hostfs.c +++ b/arch/sim/src/sim/posix/sim_hostfs.c @@ -125,7 +125,7 @@ static void host_stat_convert(struct stat *hostbuf, struct nuttx_stat_s *buf) * Name: host_open ****************************************************************************/ -int host_open(const char *pathname, int flags, nuttx_mode_t mode) +int host_open(const char *pathname, int flags, int mode) { int mapflags = 0; @@ -545,7 +545,7 @@ int host_unlink(const char *pathname) * Name: host_mkdir ****************************************************************************/ -int host_mkdir(const char *pathname, nuttx_mode_t mode) +int host_mkdir(const char *pathname, int mode) { /* Just call the host's mkdir routine */ diff --git a/include/nuttx/fs/hostfs.h b/include/nuttx/fs/hostfs.h index af96c4fa9e..24f41c9e73 100644 --- a/include/nuttx/fs/hostfs.h +++ b/include/nuttx/fs/hostfs.h @@ -130,6 +130,7 @@ typedef int32_t nuttx_off_t; typedef uint32_t nuttx_blkcnt_t; # endif typedef unsigned int nuttx_mode_t; +typedef int nuttx_fsid_t[2]; /* These must match the definition in include/time.h */ @@ -157,14 +158,15 @@ struct nuttx_dirent_s struct nuttx_statfs_s { - uint32_t f_type; /* Type of filesystem */ - nuttx_size_t f_namelen; /* Maximum length of filenames */ - nuttx_size_t f_bsize; /* Optimal block size for transfers */ - nuttx_off_t f_blocks; /* Total data blocks in the file system of this size */ - nuttx_off_t f_bfree; /* Free blocks in the file system */ - nuttx_off_t f_bavail; /* Free blocks avail to non-superuser */ - nuttx_off_t f_files; /* Total file nodes in the file system */ - nuttx_off_t f_ffree; /* Free file nodes in the file system */ + uint32_t f_type; /* Type of filesystem */ + nuttx_size_t f_namelen; /* Maximum length of filenames */ + nuttx_size_t f_bsize; /* Optimal block size for transfers */ + nuttx_blkcnt_t f_blocks; /* Total data blocks in the file system of this size */ + nuttx_blkcnt_t f_bfree; /* Free blocks in the file system */ + nuttx_blkcnt_t f_bavail; /* Free blocks avail to non-superuser */ + nuttx_blkcnt_t f_files; /* Total file nodes in the file system */ + nuttx_blkcnt_t f_ffree; /* Free file nodes in the file system */ + nuttx_fsid_t f_fsid; /* Encode device type, not yet in use */ }; /* These must exactly match the definition from include/sys/stat.h: */ @@ -193,7 +195,7 @@ struct nuttx_stat_s ****************************************************************************/ #ifdef __SIM__ -int host_open(const char *pathname, int flags, nuttx_mode_t mode); +int host_open(const char *pathname, int flags, int mode); int host_close(int fd); nuttx_ssize_t host_read(int fd, void *buf, nuttx_size_t count); nuttx_ssize_t host_write(int fd, const void *buf, nuttx_size_t count); @@ -212,7 +214,7 @@ void host_rewinddir(void *dirp); int host_closedir(void *dirp); int host_statfs(const char *path, struct nuttx_statfs_s *buf); int host_unlink(const char *pathname); -int host_mkdir(const char *pathname, nuttx_mode_t mode); +int host_mkdir(const char *pathname, int mode); int host_rmdir(const char *pathname); int host_rename(const char *oldpath, const char *newpath); int host_stat(const char *path, struct nuttx_stat_s *buf);