1/* General File System informations/capabilities 2** 3** Distributed under the terms of the MIT License. 4*/ 5#ifndef _FS_INFO_H 6#define _FS_INFO_H 7 8#include <OS.h> 9 10 11/* fs_info.flags */ 12#define B_FS_IS_READONLY 0x00000001 13#define B_FS_IS_REMOVABLE 0x00000002 14#define B_FS_IS_PERSISTENT 0x00000004 15#define B_FS_IS_SHARED 0x00000008 16#define B_FS_HAS_MIME 0x00010000 17#define B_FS_HAS_ATTR 0x00020000 18#define B_FS_HAS_QUERY 0x00040000 19// those additions are preliminary and may be removed 20#define B_FS_HAS_SELF_HEALING_LINKS 0x00080000 21#define B_FS_HAS_ALIASES 0x00100000 22#define B_FS_SUPPORTS_NODE_MONITORING 0x00200000 23 24typedef struct fs_info { 25 dev_t dev; /* volume dev_t */ 26 ino_t root; /* root ino_t */ 27 uint32 flags; /* flags (see above) */ 28 off_t block_size; /* fundamental block size */ 29 off_t io_size; /* optimal i/o size */ 30 off_t total_blocks; /* total number of blocks */ 31 off_t free_blocks; /* number of free blocks */ 32 off_t total_nodes; /* total number of nodes */ 33 off_t free_nodes; /* number of free nodes */ 34 char device_name[128]; /* device holding fs */ 35 char volume_name[B_FILE_NAME_LENGTH]; /* volume name */ 36 char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */ 37} fs_info; 38 39 40#ifdef __cplusplus 41extern "C" { 42#endif 43 44extern dev_t dev_for_path(const char *path); 45extern dev_t next_dev(int32 *pos); 46extern int fs_stat_dev(dev_t dev, fs_info *info); 47 48#ifdef __cplusplus 49} 50#endif 51 52#endif /* _FS_INFO_H */ 53