1d37f15ebSAxel Dörfler /* 2*6f7fc220SAxel Dörfler * Copyright 2002-2016, Haiku Inc. All Rights Reserved. 3d37f15ebSAxel Dörfler * Distributed under the terms of the MIT License. 4aa7d137cSAxel Dörfler */ 5aa7d137cSAxel Dörfler #ifndef _FS_INFO_H 6aa7d137cSAxel Dörfler #define _FS_INFO_H 7aa7d137cSAxel Dörfler 8aa7d137cSAxel Dörfler #include <OS.h> 9aa7d137cSAxel Dörfler 10aa7d137cSAxel Dörfler 11aa7d137cSAxel Dörfler /* fs_info.flags */ 12aa7d137cSAxel Dörfler #define B_FS_IS_READONLY 0x00000001 13aa7d137cSAxel Dörfler #define B_FS_IS_REMOVABLE 0x00000002 14aa7d137cSAxel Dörfler #define B_FS_IS_PERSISTENT 0x00000004 15aa7d137cSAxel Dörfler #define B_FS_IS_SHARED 0x00000008 16aa7d137cSAxel Dörfler #define B_FS_HAS_MIME 0x00010000 17aa7d137cSAxel Dörfler #define B_FS_HAS_ATTR 0x00020000 18aa7d137cSAxel Dörfler #define B_FS_HAS_QUERY 0x00040000 192204c4d3SAxel Dörfler // those additions are preliminary and may be removed 202204c4d3SAxel Dörfler #define B_FS_HAS_SELF_HEALING_LINKS 0x00080000 212204c4d3SAxel Dörfler #define B_FS_HAS_ALIASES 0x00100000 222204c4d3SAxel Dörfler #define B_FS_SUPPORTS_NODE_MONITORING 0x00200000 23*6f7fc220SAxel Dörfler #define B_FS_SUPPORTS_MONITOR_CHILDREN 0x00400000 24aa7d137cSAxel Dörfler 2510567eebSAxel Dörfler typedef struct fs_info { 2610567eebSAxel Dörfler dev_t dev; /* volume dev_t */ 27aa7d137cSAxel Dörfler ino_t root; /* root ino_t */ 2810567eebSAxel Dörfler uint32 flags; /* flags (see above) */ 29aa7d137cSAxel Dörfler off_t block_size; /* fundamental block size */ 3010567eebSAxel Dörfler off_t io_size; /* optimal i/o size */ 31aa7d137cSAxel Dörfler off_t total_blocks; /* total number of blocks */ 32aa7d137cSAxel Dörfler off_t free_blocks; /* number of free blocks */ 33aa7d137cSAxel Dörfler off_t total_nodes; /* total number of nodes */ 34aa7d137cSAxel Dörfler off_t free_nodes; /* number of free nodes */ 35aa7d137cSAxel Dörfler char device_name[128]; /* device holding fs */ 36aa7d137cSAxel Dörfler char volume_name[B_FILE_NAME_LENGTH]; /* volume name */ 37aa7d137cSAxel Dörfler char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */ 3810567eebSAxel Dörfler } fs_info; 39aa7d137cSAxel Dörfler 4010567eebSAxel Dörfler 4110567eebSAxel Dörfler #ifdef __cplusplus 4210567eebSAxel Dörfler extern "C" { 4310567eebSAxel Dörfler #endif 44aa7d137cSAxel Dörfler 45aa7d137cSAxel Dörfler extern dev_t dev_for_path(const char *path); 46aa7d137cSAxel Dörfler extern dev_t next_dev(int32 *pos); 47aa7d137cSAxel Dörfler extern int fs_stat_dev(dev_t dev, fs_info *info); 48aa7d137cSAxel Dörfler 49aa7d137cSAxel Dörfler #ifdef __cplusplus 50aa7d137cSAxel Dörfler } 51aa7d137cSAxel Dörfler #endif 52aa7d137cSAxel Dörfler 53aa7d137cSAxel Dörfler #endif /* _FS_INFO_H */ 54