@@ -18,7 +18,6 @@ use r_efi::efi::{AllocateType, Guid, MemoryType, Status};
1818use r_efi:: protocols:: device_path:: Protocol as DevicePathProtocol ;
1919use r_efi:: { eficall, eficall_abi} ;
2020
21- #[ cfg( not( test) ) ]
2221pub const PROTOCOL_GUID : Guid = Guid :: from_fields (
2322 0x964e_5b21 ,
2423 0x6459 ,
@@ -28,7 +27,6 @@ pub const PROTOCOL_GUID: Guid = Guid::from_fields(
2827 & [ 0x00 , 0xa0 , 0xc9 , 0x69 , 0x72 , 0x3b ] ,
2928) ;
3029
31- #[ cfg( not( test) ) ]
3230#[ repr( packed) ]
3331pub struct HardDiskDevicePathProtocol {
3432 pub device_path : DevicePathProtocol ,
@@ -40,14 +38,12 @@ pub struct HardDiskDevicePathProtocol {
4038 pub signature_type : u8 ,
4139}
4240
43- #[ cfg( not( test) ) ]
4441#[ repr( packed) ]
4542pub struct ControllerDevicePathProtocol {
4643 pub device_path : DevicePathProtocol ,
4744 pub controller : u32 ,
4845}
4946
50- #[ cfg( not( test) ) ]
5147#[ repr( C ) ]
5248struct BlockIoMedia {
5349 media_id : u32 ,
@@ -61,7 +57,6 @@ struct BlockIoMedia {
6157 last_block : u64 ,
6258}
6359
64- #[ cfg( not( test) ) ]
6560#[ repr( C ) ]
6661pub struct BlockIoProtocol {
6762 revision : u64 ,
@@ -89,7 +84,6 @@ pub struct BlockIoProtocol {
8984 ) -> Status } ,
9085}
9186
92- #[ cfg( not( test) ) ]
9387#[ repr( C ) ]
9488pub struct BlockWrapper < ' a > {
9589 hw : super :: HandleWrapper ,
@@ -103,18 +97,15 @@ pub struct BlockWrapper<'a> {
10397 start_lba : u64 ,
10498}
10599
106- #[ cfg( not( test) ) ]
107100pub struct BlockWrappers < ' a > {
108101 pub wrappers : [ * mut BlockWrapper < ' a > ; 16 ] ,
109102 pub count : usize ,
110103}
111104
112- #[ cfg( not( test) ) ]
113105pub extern "win64" fn reset ( _: * mut BlockIoProtocol , _: bool ) -> Status {
114106 Status :: UNSUPPORTED
115107}
116108
117- #[ cfg( not( test) ) ]
118109pub extern "win64" fn read_blocks (
119110 proto : * mut BlockIoProtocol ,
120111 _: u32 ,
@@ -143,7 +134,6 @@ pub extern "win64" fn read_blocks(
143134 Status :: SUCCESS
144135}
145136
146- #[ cfg( not( test) ) ]
147137pub extern "win64" fn write_blocks (
148138 proto : * mut BlockIoProtocol ,
149139 _: u32 ,
@@ -172,7 +162,6 @@ pub extern "win64" fn write_blocks(
172162 Status :: SUCCESS
173163}
174164
175- #[ cfg( not( test) ) ]
176165pub extern "win64" fn flush_blocks ( proto : * mut BlockIoProtocol ) -> Status {
177166 let wrapper = container_of ! ( proto, BlockWrapper , proto) ;
178167 let wrapper = unsafe { & * wrapper } ;
@@ -184,7 +173,6 @@ pub extern "win64" fn flush_blocks(proto: *mut BlockIoProtocol) -> Status {
184173 }
185174}
186175
187- #[ cfg( not( test) ) ]
188176impl < ' a > BlockWrapper < ' a > {
189177 pub fn new (
190178 block : * const crate :: block:: VirtioBlockDevice ,
@@ -307,7 +295,6 @@ impl<'a> BlockWrapper<'a> {
307295 }
308296}
309297
310- #[ cfg( not( test) ) ]
311298#[ allow( clippy:: transmute_ptr_to_ptr) ]
312299pub fn populate_block_wrappers (
313300 wrappers : & mut BlockWrappers ,
0 commit comments