Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3815a04

Browse files
authored
Merge pull request#1214 from phip1611/mode
uefi: simplify usage of Mode
2 parents4ca4daa +090182a commit3815a04

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎uefi/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-`MemoryMap::as_raw` which provides raw access to the memory map. This is for
2121
example useful if you create your own Multiboot2 bootloader that embeds the
2222
EFI mmap in a Multiboot2 boot information structure.
23+
-`Mode` is now`Copy` and`Clone`
2324

2425
##Changed
2526
-`SystemTable::exit_boot_services` is now`unsafe`. See that method's
@@ -35,6 +36,8 @@
3536
returned type is automatically freed on the UEFI heap, as long as boot
3637
services are not excited. By removing the need for that explicit buffer and
3738
the lifetime, the API is simpler.
39+
-`GraphicsOutput::query_mode` is now private. Use`GraphicsOutput::modes`
40+
instead.
3841

3942
##Removed
4043
- Removed the`panic-on-logger-errors` feature of the`uefi` crate. Logger

‎uefi/src/proto/console/gop.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub struct GraphicsOutput(GraphicsOutputProtocol);
7676
implGraphicsOutput{
7777
/// Returns information for an available graphics mode that the graphics
7878
/// device and the set of active video output devices supports.
79-
pubfnquery_mode(&self,index:u32,bs:&BootServices) ->Result<Mode>{
79+
fnquery_mode(&self,index:u32,bs:&BootServices) ->Result<Mode>{
8080
letmut info_sz =0;
8181
letmut info_heap_ptr = ptr::null();
8282
// query_mode allocates a buffer and stores the heap ptr in the provided
@@ -100,7 +100,7 @@ impl GraphicsOutput {
100100
})
101101
}
102102

103-
/// Returnsinformation about all available graphics modes.
103+
/// Returnsa [`ModeIter`].
104104
#[must_use]
105105
pubfnmodes<'a>(&'aself,bs:&'aBootServices) ->ModeIter{
106106
ModeIter{
@@ -336,7 +336,7 @@ pub enum PixelFormat {
336336
}
337337

338338
/// Represents a graphics mode compatible with a given graphics device.
339-
#[derive(Debug)]
339+
#[derive(Copy,Clone,Debug)]
340340
pubstructMode{
341341
index:u32,
342342
info_sz:usize,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp