mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel: Fix incorrect argument when constructing DiskPartitionMetadata
The existing code invokes operator bool for the partition_type variable.
This commit is contained in:
parent
24376e7759
commit
4b5dbc15df
2 changed files with 3 additions and 9 deletions
|
@ -64,9 +64,7 @@ EBRPartitionTable::EBRPartitionTable(const StorageDevice& device)
|
|||
if (entry.offset == 0x00) {
|
||||
continue;
|
||||
}
|
||||
auto partition_type = ByteBuffer::create_zeroed(sizeof(u8));
|
||||
partition_type.data()[0] = entry.type;
|
||||
m_partitions.append(DiskPartitionMetadata({ entry.offset, (entry.offset + entry.length), partition_type }));
|
||||
m_partitions.empend(entry.offset, (entry.offset + entry.length), entry.type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,9 +60,7 @@ MBRPartitionTable::MBRPartitionTable(const StorageDevice& device, u32 start_lba)
|
|||
if (entry.offset == 0x00) {
|
||||
continue;
|
||||
}
|
||||
auto partition_type = ByteBuffer::create_zeroed(sizeof(u8));
|
||||
partition_type.data()[0] = entry.type;
|
||||
m_partitions.append(DiskPartitionMetadata({ entry.offset, (entry.offset + entry.length), partition_type }));
|
||||
m_partitions.empend(entry.offset, (entry.offset + entry.length), entry.type);
|
||||
}
|
||||
m_valid = true;
|
||||
}
|
||||
|
@ -81,9 +79,7 @@ MBRPartitionTable::MBRPartitionTable(const StorageDevice& device)
|
|||
if (entry.offset == 0x00) {
|
||||
continue;
|
||||
}
|
||||
auto partition_type = ByteBuffer::create_zeroed(sizeof(u8));
|
||||
partition_type.data()[0] = entry.type;
|
||||
m_partitions.append(DiskPartitionMetadata({ entry.offset, (entry.offset + entry.length), partition_type }));
|
||||
m_partitions.empend(entry.offset, (entry.offset + entry.length), entry.type);
|
||||
}
|
||||
m_valid = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue