Add ATA drive support #27

Merged
apio merged 28 commits from please-read-my-ata-drive into main 2023-06-16 19:40:11 +00:00
Showing only changes of commit bb0db450b3 - Show all commits

View File

@ -727,7 +727,7 @@ Result<void> ATADevice::create(SharedPtr<ATA::Drive> drive)
{
auto device = TRY(adopt_shared_if_nonnull(new (std::nothrow) ATADevice()));
device->m_drive = drive;
return DeviceRegistry::register_special_device(DeviceRegistry::Disk, next_minor++, device);
return DeviceRegistry::register_special_device(DeviceRegistry::Disk, next_minor++, device, "cdrom", 0400);
}
Result<u64> ATADevice::read(u8* buf, usize offset, usize size) const