statfs: add f_fsid field for third-party code compile

because NuttX doesn't have the device number, so we're not assigning a
valid value here. just memset to zero.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-06-13 00:41:48 +08:00 committed by Xiang Xiao
parent b723e90356
commit 7b5af12158
2 changed files with 8 additions and 0 deletions

View File

@ -104,6 +104,8 @@
* Type Definitions * Type Definitions
****************************************************************************/ ****************************************************************************/
typedef struct fsid_s fsid_t;
struct statfs struct statfs
{ {
uint32_t f_type; /* Type of filesystem (see definitions above) */ uint32_t f_type; /* Type of filesystem (see definitions above) */
@ -114,6 +116,7 @@ struct statfs
fsblkcnt_t f_bavail; /* Free blocks avail to non-superuser */ fsblkcnt_t f_bavail; /* Free blocks avail to non-superuser */
fsfilcnt_t f_files; /* Total file nodes in the file system */ fsfilcnt_t f_files; /* Total file nodes in the file system */
fsfilcnt_t f_ffree; /* Free file nodes in the file system */ fsfilcnt_t f_ffree; /* Free file nodes in the file system */
fsid_t f_fsid; /* Encode device type, not yet in use */
}; };
/**************************************************************************** /****************************************************************************

View File

@ -294,6 +294,11 @@ typedef uint24_t u_int24_t;
typedef uint64_t u_int64_t; typedef uint64_t u_int64_t;
#endif #endif
struct fsid_s
{
int val[2];
};
/* Task entry point */ /* Task entry point */
typedef CODE int (*main_t)(int argc, FAR char *argv[]); typedef CODE int (*main_t)(int argc, FAR char *argv[]);