1207753Smm/* 2207753Smm * Copyright 2002-2016, Haiku Inc. All Rights Reserved. 3207753Smm * Distributed under the terms of the MIT License. 4207753Smm */ 5207753Smm#ifndef _FS_INFO_H 6207753Smm#define _FS_INFO_H 7207753Smm 8207753Smm#include <OS.h> 9207753Smm 10207753Smm 11207753Smm/* fs_info.flags */ 12207753Smm#define B_FS_IS_READONLY 0x00000001 13207753Smm#define B_FS_IS_REMOVABLE 0x00000002 14207753Smm#define B_FS_IS_PERSISTENT 0x00000004 15207753Smm#define B_FS_IS_SHARED 0x00000008 16207753Smm#define B_FS_HAS_MIME 0x00010000 17207753Smm#define B_FS_HAS_ATTR 0x00020000 18207753Smm#define B_FS_HAS_QUERY 0x00040000 19207753Smm// those additions are preliminary and may be removed 20207753Smm#define B_FS_HAS_SELF_HEALING_LINKS 0x00080000 21207753Smm#define B_FS_HAS_ALIASES 0x00100000 22207753Smm#define B_FS_SUPPORTS_NODE_MONITORING 0x00200000 23207753Smm#define B_FS_SUPPORTS_MONITOR_CHILDREN 0x00400000 24207753Smm 25207753Smmtypedef struct fs_info { 26207753Smm dev_t dev; /* volume dev_t */ 27207753Smm ino_t root; /* root ino_t */ 28207753Smm uint32 flags; /* flags (see above) */ 29207753Smm off_t block_size; /* fundamental block size */ 30207753Smm off_t io_size; /* optimal i/o size */ 31 off_t total_blocks; /* total number of blocks */ 32 off_t free_blocks; /* number of free blocks */ 33 off_t total_nodes; /* total number of nodes */ 34 off_t free_nodes; /* number of free nodes */ 35 char device_name[128]; /* device holding fs */ 36 char volume_name[B_FILE_NAME_LENGTH]; /* volume name */ 37 char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */ 38} fs_info; 39 40 41#ifdef __cplusplus 42extern "C" { 43#endif 44 45extern dev_t dev_for_path(const char *path); 46extern dev_t next_dev(int32 *pos); 47extern int fs_stat_dev(dev_t dev, fs_info *info); 48 49#ifdef __cplusplus 50} 51#endif 52 53#endif /* _FS_INFO_H */ 54