Skip to content

Commit fe33dcc

Browse files
committed
uefi: mem: boot.rs -> boot/mod.rs
1 parent 7a0a8ee commit fe33dcc

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

uefi/src/table/boot.rs renamed to uefi/src/table/boot/mod.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ impl BootServices {
285285
&mut desc_version,
286286
)
287287
}
288-
.to_result_with_val(|| MemoryMapMeta {
289-
map_size,
290-
desc_size,
291-
map_key,
292-
desc_version,
293-
})
288+
.to_result_with_val(|| MemoryMapMeta {
289+
map_size,
290+
desc_size,
291+
map_key,
292+
desc_version,
293+
})
294294
}
295295

296296
/// Allocates from a memory pool. The pointer will be 8-byte aligned.
@@ -436,10 +436,10 @@ impl BootServices {
436436
opt_nonnull_to_ptr(event_group),
437437
&mut event,
438438
)
439-
.to_result_with_val(
440-
// OK to unwrap: event is non-null for Status::SUCCESS.
441-
|| Event::from_ptr(event).unwrap(),
442-
)
439+
.to_result_with_val(
440+
// OK to unwrap: event is non-null for Status::SUCCESS.
441+
|| Event::from_ptr(event).unwrap(),
442+
)
443443
}
444444

445445
/// Sets the trigger for `EventType::TIMER` event.
@@ -602,7 +602,7 @@ impl BootServices {
602602
InterfaceType::NATIVE_INTERFACE,
603603
interface,
604604
))
605-
.to_result_with_val(|| Handle::from_ptr(handle).unwrap())
605+
.to_result_with_val(|| Handle::from_ptr(handle).unwrap())
606606
}
607607

608608
/// Reinstalls a protocol interface on a device handle. `old_interface` is replaced with `new_interface`.
@@ -637,7 +637,7 @@ impl BootServices {
637637
old_interface,
638638
new_interface,
639639
)
640-
.to_result()
640+
.to_result()
641641
}
642642

643643
/// Removes a protocol interface from a device handle.
@@ -905,10 +905,10 @@ impl BootServices {
905905
source_size,
906906
&mut image_handle,
907907
)
908-
.to_result_with_val(
909-
// OK to unwrap: image handle is non-null for Status::SUCCESS.
910-
|| Handle::from_ptr(image_handle).unwrap(),
911-
)
908+
.to_result_with_val(
909+
// OK to unwrap: image handle is non-null for Status::SUCCESS.
910+
|| Handle::from_ptr(image_handle).unwrap(),
911+
)
912912
}
913913
}
914914

@@ -1115,7 +1115,7 @@ impl BootServices {
11151115
recursive,
11161116
)
11171117
}
1118-
.to_result_with_err(|_| ())
1118+
.to_result_with_err(|_| ())
11191119
}
11201120

11211121
/// Disconnect one or more drivers from a controller.
@@ -1142,7 +1142,7 @@ impl BootServices {
11421142
Handle::opt_to_ptr(child),
11431143
)
11441144
}
1145-
.to_result_with_err(|_| ())
1145+
.to_result_with_err(|_| ())
11461146
}
11471147

11481148
/// Open a protocol interface for a handle.
@@ -1201,18 +1201,18 @@ impl BootServices {
12011201
Handle::opt_to_ptr(params.controller),
12021202
attributes as u32,
12031203
)
1204-
.to_result_with_val(|| {
1205-
let interface = (!interface.is_null()).then(|| {
1206-
let interface = P::mut_ptr_from_ffi(interface) as *const UnsafeCell<P>;
1207-
&*interface
1208-
});
1209-
1210-
ScopedProtocol {
1211-
interface,
1212-
open_params: params,
1213-
boot_services: self,
1214-
}
1215-
})
1204+
.to_result_with_val(|| {
1205+
let interface = (!interface.is_null()).then(|| {
1206+
let interface = P::mut_ptr_from_ffi(interface) as *const UnsafeCell<P>;
1207+
&*interface
1208+
});
1209+
1210+
ScopedProtocol {
1211+
interface,
1212+
open_params: params,
1213+
boot_services: self,
1214+
}
1215+
})
12161216
}
12171217

12181218
/// Open a protocol interface for a handle in exclusive mode.
@@ -1273,7 +1273,7 @@ impl BootServices {
12731273
TEST_PROTOCOL,
12741274
)
12751275
}
1276-
.to_result_with_val(|| ())
1276+
.to_result_with_val(|| ())
12771277
}
12781278

12791279
/// Get the list of protocol interface [`Guids`][Guid] that are installed

0 commit comments

Comments
 (0)