00001 /******************************************************************************* 00002 / 00003 / File: fs_info.h 00004 / 00005 / Description: File system information. 00006 / 00007 / Copyright 1993-98, Be Incorporated, All Rights Reserved. 00008 / 00009 *******************************************************************************/ 00010 00011 00012 #ifndef _FS_INFO_H 00013 #define _FS_INFO_H 00014 00015 #include <BeBuild.h> 00016 #include <sys/types.h> 00017 #include <OS.h> 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 #define B_FS_IS_READONLY 0x00000001 00024 #define B_FS_IS_REMOVABLE 0x00000002 00025 #define B_FS_IS_PERSISTENT 0x00000004 00026 #define B_FS_IS_SHARED 0x00000008 00027 #define B_FS_HAS_MIME 0x00010000 00028 #define B_FS_HAS_ATTR 0x00020000 00029 #define B_FS_HAS_QUERY 0x00040000 00030 00031 struct fs_info { 00032 dev_t dev; /* fs dev_t */ 00033 ino_t root; /* root ino_t */ 00034 uint32 flags; /* file system flags */ 00035 off_t block_size; /* fundamental block size */ 00036 off_t io_size; /* optimal io size */ 00037 off_t total_blocks; /* total number of blocks */ 00038 off_t free_blocks; /* number of free blocks */ 00039 off_t total_nodes; /* total number of nodes */ 00040 off_t free_nodes; /* number of free nodes */ 00041 char device_name[128]; /* device holding fs */ 00042 char volume_name[B_FILE_NAME_LENGTH]; /* volume name */ 00043 char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */ 00044 }; 00045 00046 typedef struct fs_info fs_info; 00047 00048 dev_t dev_for_path(const char *path); 00049 dev_t next_dev(int32 *pos); 00050 int fs_stat_dev(dev_t dev, fs_info *info); 00051 00052 #ifdef __cplusplus 00053 } 00054 #endif 00055 00056 #endif