Added flags for disk systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4009 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -23,9 +23,10 @@ public:
|
||||
// void SetID(disk_system_id id);
|
||||
disk_system_id ID() const;
|
||||
const char *Name() const;
|
||||
virtual const char *PrettyName();
|
||||
const char *PrettyName();
|
||||
uint32 Flags() const;
|
||||
|
||||
virtual bool IsFileSystem() const;
|
||||
bool IsFileSystem() const;
|
||||
bool IsPartitioningSystem() const;
|
||||
|
||||
void GetInfo(user_disk_system_info *info);
|
||||
@@ -137,6 +138,7 @@ protected:
|
||||
virtual void UnloadModule();
|
||||
|
||||
status_t SetPrettyName(const char *name);
|
||||
void SetFlags(uint32 flags);
|
||||
|
||||
static int32 _NextID();
|
||||
|
||||
@@ -144,6 +146,7 @@ private:
|
||||
disk_system_id fID;
|
||||
char *fName;
|
||||
char *fPrettyName;
|
||||
uint32 fFlags;
|
||||
int32 fLoadCounter;
|
||||
|
||||
static int32 fNextID;
|
||||
|
||||
@@ -20,8 +20,6 @@ public:
|
||||
|
||||
virtual status_t Init();
|
||||
|
||||
virtual bool IsFileSystem() const;
|
||||
|
||||
// Scanning
|
||||
|
||||
virtual float Identify(KPartition *partition, void **cookie);
|
||||
|
||||
@@ -17,8 +17,6 @@ public:
|
||||
|
||||
virtual status_t Init();
|
||||
|
||||
virtual bool IsFileSystem() const;
|
||||
|
||||
// Scanning
|
||||
|
||||
virtual float Identify(KPartition *partition, void **cookie);
|
||||
|
||||
@@ -117,6 +117,7 @@ typedef status_t (*partition_set_partition_content_parameters)(int fd,
|
||||
typedef struct partition_module_info {
|
||||
module_info module;
|
||||
const char *pretty_name;
|
||||
uint32 flags;
|
||||
|
||||
// scanning
|
||||
partition_identify_partition identify_partition;
|
||||
@@ -243,6 +244,7 @@ typedef status_t (*fs_set_partition_content_parameters)(int fd,
|
||||
typedef struct fs_module_info {
|
||||
module_info module;
|
||||
const char *pretty_name;
|
||||
uint32 flags;
|
||||
|
||||
// scanning
|
||||
fs_identify_partition identify_partition;
|
||||
|
||||
@@ -52,7 +52,7 @@ struct user_disk_system_info {
|
||||
disk_system_id id;
|
||||
char name[B_FILE_NAME_LENGTH]; // better B_PATH_NAME_LENGTH?
|
||||
char pretty_name[B_OS_NAME_LENGTH];
|
||||
bool file_system;
|
||||
uint32 flags;
|
||||
};
|
||||
|
||||
// userland disk device job representation
|
||||
|
||||
@@ -42,6 +42,39 @@ enum {
|
||||
B_DISK_DEVICE_WRITE_ONCE = 0x08,
|
||||
};
|
||||
|
||||
// disk system flags
|
||||
enum {
|
||||
B_DISK_SYSTEM_IS_FILE_SYSTEM = 0x0001,
|
||||
|
||||
// flags common for both file and partitioning systems
|
||||
B_DISK_SYSTEM_SUPPORTS_CHECKING = 0x0002,
|
||||
B_DISK_SYSTEM_SUPPORTS_REPAIRING = 0x0004,
|
||||
B_DISK_SYSTEM_SUPPORTS_RESIZING = 0x0008,
|
||||
B_DISK_SYSTEM_SUPPORTS_MOVING = 0x0010,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME = 0x0020,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS = 0x0040,
|
||||
|
||||
// file system specific flags
|
||||
B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING = 0x0100,
|
||||
B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED = 0x0200,
|
||||
B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED = 0x0400,
|
||||
B_DISK_SYSTEM_SUPPORTS_REPAIRING_WHILE_MOUNTED = 0x0800,
|
||||
B_DISK_SYSTEM_SUPPORTS_RESIZING_WHILE_MOUNTED = 0x1000,
|
||||
B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED = 0x2000,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED = 0x4000,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED = 0x8000,
|
||||
|
||||
// partitioning system specific flags
|
||||
B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD = 0x0100,
|
||||
B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD = 0x0200,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_NAME = 0x0400,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE = 0x0800,
|
||||
B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS = 0x1000,
|
||||
B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD = 0x2000,
|
||||
B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD = 0x4000,
|
||||
B_DISK_SYSTEM_SUPPORTS_INITIALIZING = 0x8000,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user