/** * @defgroup statfs Statfs * @ingroup libc */ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __XLT_OS__ #define ROMFS_MAGIC 0x7275 #define MSDOS_SUPER_MAGIC 0x4d44 #define RAMFS_MAGIC 0x858458f6 #define YAFFS_MAGIC 0x5941ff53 #define NFS_SUPER_MAGIC 0x6969 #define PROCFS_MAGIC 0x434f5250 #define JFFS2_SUPER_MAGIC 0x72b6 #endif typedef struct __fsid_t { int __val[2]; } fsid_t; #include /** * @ingroup statfs * * @par Description: * The statfs() function shall get the information of the file system pointed to by the path and return the * information in buf. * * @attention *
    *
  • Now only fat filesystem support this function.
  • *
* * @retval #0 On success. * @retval #-1 On failure with errno set. * * @par Errors *
    *
  • EFAULT: The path is a null pointer or the buf is a null pointer.
  • *
  • ENAMETOOLONG: The length of a component of a pathname is longer than {NAME_MAX}.
  • *
  • ENOENT: A component of the path does not exist.
  • *
  • ENODEV: The mount is not healthy.
  • *
* * @par Dependency: *
  • statfs.h
* @see None * @since Huawei LiteOS V100R001C00 */ int statfs (const char *, struct statfs *); int fstatfs (int, struct statfs *); #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) #define statfs64 statfs #define fstatfs64 fstatfs #define fsblkcnt64_t fsblkcnt_t #define fsfilcnt64_t fsfilcnt_t #endif #ifdef __cplusplus } #endif #endif