mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:52:43 +00:00 
			
		
		
		
	Kernel/Storage: Modernize ATA IDE controller initialization code
This is done by 2 ways which both fit very well together: - We stop use LockRefPtrs. We also don't allow expansion of the m_channels member, by setting it to be a fixed Array of 2 IDEChannels. - More error propagation through the code, in the construction point of IDEChannel(s). This means that in the future we could technically do something meaningful with OOM conditions when initializing an IDE controller.
This commit is contained in:
		
							parent
							
								
									dac7e911e6
								
							
						
					
					
						commit
						0050358cd3
					
				
					 5 changed files with 17 additions and 17 deletions
				
			
		|  | @ -31,6 +31,6 @@ protected: | |||
|     IDEController(); | ||||
| 
 | ||||
|     LockRefPtr<StorageDevice> device_by_channel_and_position(u32 index) const; | ||||
|     Vector<NonnullLockRefPtr<IDEChannel>> m_channels; | ||||
|     Array<RefPtr<IDEChannel>, 2> m_channels; | ||||
| }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A