Kernel: Use Vector instead of raw poiters in Disk stuff

We now don't have to manually free allocated data
This commit is contained in:
Bananymous
2023-02-16 20:48:41 +02:00
parent 7f12a7050a
commit 8f1b6da2af
4 changed files with 47 additions and 38 deletions

View File

@@ -38,7 +38,9 @@ namespace Kernel
: ATADevice(io_base, ctl_base, slave_bit)
{}
virtual uint32_t sector_size() const override { return m_sector_words * 2; }
virtual const char* type() const override { return "PATA"; }
virtual bool read(uint32_t lba, uint32_t sector_count, uint8_t* buffer) override;
protected:
@@ -52,6 +54,7 @@ namespace Kernel
private:
bool m_lba_48 = false;
uint32_t m_sector_words = 256;
};

View File

@@ -25,6 +25,7 @@ namespace Kernel
bool initialize_partitions();
virtual bool read(uint32_t lba, uint32_t sector_count, uint8_t* buffer) = 0;
virtual uint32_t sector_size() const = 0;
private:
BAN::Vector<Partition> m_partitions;