2009-07-29 04:57:41 +04:00
|
|
|
/*
|
2009-07-29 18:14:08 +04:00
|
|
|
* Copyright 2002-2003, Haiku Inc. All Rights Reserved.
|
2009-07-29 04:57:41 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-07-23 18:03:03 +04:00
|
|
|
#ifndef _FS_INFO_H
|
|
|
|
#define _FS_INFO_H
|
|
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* fs_info.flags */
|
|
|
|
#define B_FS_IS_READONLY 0x00000001
|
|
|
|
#define B_FS_IS_REMOVABLE 0x00000002
|
|
|
|
#define B_FS_IS_PERSISTENT 0x00000004
|
|
|
|
#define B_FS_IS_SHARED 0x00000008
|
|
|
|
#define B_FS_HAS_MIME 0x00010000
|
|
|
|
#define B_FS_HAS_ATTR 0x00020000
|
|
|
|
#define B_FS_HAS_QUERY 0x00040000
|
2002-08-05 05:31:23 +04:00
|
|
|
// those additions are preliminary and may be removed
|
|
|
|
#define B_FS_HAS_SELF_HEALING_LINKS 0x00080000
|
|
|
|
#define B_FS_HAS_ALIASES 0x00100000
|
|
|
|
#define B_FS_SUPPORTS_NODE_MONITORING 0x00200000
|
2002-07-23 18:03:03 +04:00
|
|
|
|
2002-09-24 20:02:53 +04:00
|
|
|
typedef struct fs_info {
|
|
|
|
dev_t dev; /* volume dev_t */
|
2002-07-23 18:03:03 +04:00
|
|
|
ino_t root; /* root ino_t */
|
2002-09-24 20:02:53 +04:00
|
|
|
uint32 flags; /* flags (see above) */
|
2002-07-23 18:03:03 +04:00
|
|
|
off_t block_size; /* fundamental block size */
|
2002-09-24 20:02:53 +04:00
|
|
|
off_t io_size; /* optimal i/o size */
|
2002-07-23 18:03:03 +04:00
|
|
|
off_t total_blocks; /* total number of blocks */
|
|
|
|
off_t free_blocks; /* number of free blocks */
|
|
|
|
off_t total_nodes; /* total number of nodes */
|
|
|
|
off_t free_nodes; /* number of free nodes */
|
|
|
|
char device_name[128]; /* device holding fs */
|
|
|
|
char volume_name[B_FILE_NAME_LENGTH]; /* volume name */
|
|
|
|
char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */
|
2002-09-24 20:02:53 +04:00
|
|
|
} fs_info;
|
|
|
|
|
2002-07-23 18:03:03 +04:00
|
|
|
|
2002-09-24 20:02:53 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2002-07-23 18:03:03 +04:00
|
|
|
|
|
|
|
extern dev_t dev_for_path(const char *path);
|
|
|
|
extern dev_t next_dev(int32 *pos);
|
|
|
|
extern int fs_stat_dev(dev_t dev, fs_info *info);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _FS_INFO_H */
|