DriveSetup: add a column for the physical block size
Change-Id: Id43df9eb4a3619ba265ed25aeb7ec82d0a26358c Reviewed-on: https://review.haiku-os.org/c/haiku/+/5668 Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This commit is contained in:
parent
688acf41a3
commit
143a5f8ce6
@ -47,6 +47,7 @@ enum {
|
||||
kSizeColumn,
|
||||
kFreeSizeColumn,
|
||||
kBlockSizeColumn,
|
||||
kPhysicalBlockSizeColumn,
|
||||
kParametersColumn,
|
||||
kPartitionTypeColumn,
|
||||
};
|
||||
@ -342,6 +343,11 @@ PartitionListRow::PartitionListRow(BPartition* partition)
|
||||
partition->BlockSize());
|
||||
SetField(new BStringField(blocksize), kBlockSizeColumn);
|
||||
|
||||
char physicalBlocksize[16];
|
||||
snprintf(physicalBlocksize, sizeof(physicalBlocksize), "%" B_PRIu32,
|
||||
partition->PhysicalBlockSize());
|
||||
SetField(new BStringField(physicalBlocksize), kPhysicalBlockSizeColumn);
|
||||
|
||||
// Additional parameters
|
||||
|
||||
if (partition->Parameters() != NULL) {
|
||||
@ -423,6 +429,8 @@ PartitionListView::PartitionListView(const BRect& frame, uint32 resizeMode)
|
||||
B_TRUNCATE_END, B_ALIGN_RIGHT), kFreeSizeColumn);
|
||||
AddColumn(new PartitionColumn(B_TRANSLATE("Block size"), 50, 50, 500,
|
||||
B_TRUNCATE_END, B_ALIGN_RIGHT), kBlockSizeColumn);
|
||||
AddColumn(new PartitionColumn(B_TRANSLATE("Physical Block size"), 50, 50, 500,
|
||||
B_TRUNCATE_END, B_ALIGN_RIGHT), kPhysicalBlockSizeColumn);
|
||||
AddColumn(new PartitionColumn(B_TRANSLATE("Parameters"), 100, 50, 500,
|
||||
B_TRUNCATE_END), kParametersColumn);
|
||||
AddColumn(new PartitionColumn(B_TRANSLATE("Partition type"), 200, 50, 500,
|
||||
|
@ -39,6 +39,7 @@ dump_partition_info(const BPartition* partition)
|
||||
printf("\tContentSize(): %s\n", string_for_size(partition->ContentSize(),
|
||||
size, sizeof(size)));
|
||||
printf("\tBlockSize(): %" B_PRId32 "\n", partition->BlockSize());
|
||||
printf("\tPhysicalBlockSize(): %" B_PRId32 "\n", partition->PhysicalBlockSize());
|
||||
printf("\tIndex(): %" B_PRId32 "\n", partition->Index());
|
||||
printf("\tStatus(): %" B_PRId32 "\n\n", partition->Status());
|
||||
printf("\tContainsFileSystem(): %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user