BDiskSystemAddOn: Remove the Flags field.

Nothing used it. Instead the kernel addons' flags are used instead,
except in the case of PartitionDelegate, which calls SupportedOperations().
This commit is contained in:
Augustin Cavalier
2024-12-19 16:34:16 -05:00
parent f48a542cf4
commit 04c8e27efa
8 changed files with 10 additions and 86 deletions
+1 -4
View File
@@ -19,12 +19,10 @@ class BPartitioningInfo;
class BDiskSystemAddOn { class BDiskSystemAddOn {
public: public:
BDiskSystemAddOn(const char* name, BDiskSystemAddOn(const char* name);
uint32 flags);
virtual ~BDiskSystemAddOn(); virtual ~BDiskSystemAddOn();
const char* Name() const; const char* Name() const;
uint32 Flags() const;
virtual status_t CreatePartitionHandle( virtual status_t CreatePartitionHandle(
BMutablePartition* partition, BMutablePartition* partition,
@@ -48,7 +46,6 @@ public:
private: private:
BString fName; BString fName;
uint32 fFlags;
}; };
+1 -1
View File
@@ -71,7 +71,7 @@ size_string(double size)
BFSAddOn::BFSAddOn() BFSAddOn::BFSAddOn()
: BDiskSystemAddOn(kPartitionTypeBFS, kDiskSystemFlags) : BDiskSystemAddOn(kPartitionTypeBFS)
{ {
} }
+1 -1
View File
@@ -43,7 +43,7 @@ static const uint32 kDiskSystemFlags =
#define TRACE printf #define TRACE printf
FATAddOn::FATAddOn() FATAddOn::FATAddOn()
: BDiskSystemAddOn(kPartitionTypeFAT32, kDiskSystemFlags) : BDiskSystemAddOn(kPartitionTypeFAT32)
{ {
} }
+1 -23
View File
@@ -32,34 +32,12 @@
#endif #endif
static const uint32 kDiskSystemFlags =
0
// | B_DISK_SYSTEM_SUPPORTS_CHECKING
// | B_DISK_SYSTEM_SUPPORTS_REPAIRING
// | B_DISK_SYSTEM_SUPPORTS_RESIZING
// | B_DISK_SYSTEM_SUPPORTS_MOVING
// | B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME
// | B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS
| B_DISK_SYSTEM_SUPPORTS_INITIALIZING
// | B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
// | B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD
| B_DISK_SYSTEM_SUPPORTS_SETTING_NAME
| B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE
// | B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS
| B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD
| B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD
| B_DISK_SYSTEM_SUPPORTS_NAME
;
// #pragma mark - GPTDiskAddOn // #pragma mark - GPTDiskAddOn
GPTDiskAddOn::GPTDiskAddOn() GPTDiskAddOn::GPTDiskAddOn()
: :
BDiskSystemAddOn(EFI_PARTITION_NAME, kDiskSystemFlags) BDiskSystemAddOn(EFI_PARTITION_NAME)
{ {
} }
@@ -32,34 +32,12 @@
using std::nothrow; using std::nothrow;
static const uint32 kDiskSystemFlags =
0
// | B_DISK_SYSTEM_SUPPORTS_CHECKING
// | B_DISK_SYSTEM_SUPPORTS_REPAIRING
// | B_DISK_SYSTEM_SUPPORTS_RESIZING
// | B_DISK_SYSTEM_SUPPORTS_MOVING
// | B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME
// | B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS
// | B_DISK_SYSTEM_SUPPORTS_INITIALIZING
// | B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
// | B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_SETTING_NAME
| B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE
// | B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS
| B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD
| B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_NAME
;
// #pragma mark - ExtendedPartitionAddOn // #pragma mark - ExtendedPartitionAddOn
ExtendedPartitionAddOn::ExtendedPartitionAddOn() ExtendedPartitionAddOn::ExtendedPartitionAddOn()
: :
BDiskSystemAddOn(kPartitionTypeIntelExtended, kDiskSystemFlags) BDiskSystemAddOn(kPartitionTypeIntelExtended)
{ {
} }
@@ -31,34 +31,12 @@
using std::nothrow; using std::nothrow;
static const uint32 kDiskSystemFlags =
0
// | B_DISK_SYSTEM_SUPPORTS_CHECKING
// | B_DISK_SYSTEM_SUPPORTS_REPAIRING
| B_DISK_SYSTEM_SUPPORTS_RESIZING
| B_DISK_SYSTEM_SUPPORTS_MOVING
// | B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME
| B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS
| B_DISK_SYSTEM_SUPPORTS_INITIALIZING
// | B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
| B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD
| B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_SETTING_NAME
| B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE
// | B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS
| B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD
| B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD
// | B_DISK_SYSTEM_SUPPORTS_NAME
;
// #pragma mark - PartitionMapAddOn // #pragma mark - PartitionMapAddOn
PartitionMapAddOn::PartitionMapAddOn() PartitionMapAddOn::PartitionMapAddOn()
: :
BDiskSystemAddOn(kPartitionTypeIntel, kDiskSystemFlags) BDiskSystemAddOn(kPartitionTypeIntel)
{ {
} }
+2 -1
View File
@@ -43,8 +43,9 @@ static const uint32 kDiskSystemFlags =
#define TRACE printf #define TRACE printf
NTFSAddOn::NTFSAddOn() NTFSAddOn::NTFSAddOn()
: BDiskSystemAddOn(kPartitionTypeNTFS, kDiskSystemFlags) : BDiskSystemAddOn(kPartitionTypeNTFS)
{ {
} }
@@ -12,10 +12,9 @@
// #pragma mark - BDiskSystemAddOn // #pragma mark - BDiskSystemAddOn
BDiskSystemAddOn::BDiskSystemAddOn(const char* name, uint32 flags) BDiskSystemAddOn::BDiskSystemAddOn(const char* name)
: :
fName(name), fName(name)
fFlags(flags)
{ {
} }
@@ -32,13 +31,6 @@ BDiskSystemAddOn::Name() const
} }
uint32
BDiskSystemAddOn::Flags() const
{
return fFlags;
}
bool bool
BDiskSystemAddOn::CanInitialize(const BMutablePartition* partition) BDiskSystemAddOn::CanInitialize(const BMutablePartition* partition)
{ {