1/* General File System informations/capabilities 2** 3** Distributed under the terms of the MIT License. 4*/ 5#ifndef _FSSH_FS_INFO_H 6#define _FSSH_FS_INFO_H 7 8#include "fssh_defs.h" 9#include "fssh_os.h" 10 11 12/* fs_info.flags */ 13#define FSSH_B_FS_IS_READONLY 0x00000001 14#define FSSH_B_FS_IS_REMOVABLE 0x00000002 15#define FSSH_B_FS_IS_PERSISTENT 0x00000004 16#define FSSH_B_FS_IS_SHARED 0x00000008 17#define FSSH_B_FS_HAS_MIME 0x00010000 18#define FSSH_B_FS_HAS_ATTR 0x00020000 19#define FSSH_B_FS_HAS_QUERY 0x00040000 20// those additions are preliminary and may be removed 21#define FSSH_B_FS_HAS_SELF_HEALING_LINKS 0x00080000 22#define FSSH_B_FS_HAS_ALIASES 0x00100000 23#define FSSH_B_FS_SUPPORTS_NODE_MONITORING 0x00200000 24#define FSSH_B_FS_SUPPORTS_MONITOR_CHILDREN 0x00400000 25 26typedef struct fssh_fs_info { 27 fssh_dev_t dev; /* volume dev_t */ 28 fssh_ino_t root; /* root ino_t */ 29 uint32_t flags; /* flags (see above) */ 30 fssh_off_t block_size; /* fundamental block size */ 31 fssh_off_t io_size; /* optimal i/o size */ 32 fssh_off_t total_blocks; /* total number of blocks */ 33 fssh_off_t free_blocks; /* number of free blocks */ 34 fssh_off_t total_nodes; /* total number of nodes */ 35 fssh_off_t free_nodes; /* number of free nodes */ 36 char device_name[128]; /* device holding fs */ 37 char volume_name[FSSH_B_FILE_NAME_LENGTH]; /* volume name */ 38 char fsh_name[FSSH_B_OS_NAME_LENGTH]; /* name of fs handler */ 39} fssh_fs_info; 40 41 42#ifdef __cplusplus 43extern "C" { 44#endif 45 46extern fssh_dev_t dev_for_path(const char *path); 47extern fssh_dev_t next_dev(int32_t *pos); 48extern int fs_stat_dev(fssh_dev_t dev, fssh_fs_info *info); 49 50#ifdef __cplusplus 51} 52#endif 53 54#endif /* _FSSH_FS_INFO_H */ 55