mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	 190cf1507b
			
		
	
	
		190cf1507b
		
	
	
	
	
		
			
			https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <AK/StringView.h>
 | |
| #include <Kernel/Sections.h>
 | |
| #include <Kernel/Storage/ATA/ATADevice.h>
 | |
| #include <Kernel/Storage/ATA/IDEChannel.h>
 | |
| #include <Kernel/Storage/ATA/IDEController.h>
 | |
| #include <Kernel/Storage/StorageManagement.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| ATADevice::ATADevice(const ATAController& controller, ATADevice::Address ata_address, MinorNumber minor_number, u16 capabilities, u16 logical_sector_size, u64 max_addressable_block, NonnullOwnPtr<KString> early_storage_name)
 | |
|     : StorageDevice(StorageManagement::storage_type_major_number(), minor_number, logical_sector_size, max_addressable_block, move(early_storage_name))
 | |
|     , m_controller(controller)
 | |
|     , m_ata_address(ata_address)
 | |
|     , m_capabilities(capabilities)
 | |
| {
 | |
| }
 | |
| 
 | |
| ATADevice::~ATADevice() = default;
 | |
| 
 | |
| void ATADevice::start_request(AsyncBlockDeviceRequest& request)
 | |
| {
 | |
|     auto controller = m_controller.strong_ref();
 | |
|     VERIFY(controller);
 | |
|     controller->start_request(*this, request);
 | |
| }
 | |
| 
 | |
| }
 |