Skip to content

Commit bea014a

Browse files
committed
uefi: improve Http::get_mode_data
1 parent 8cbc3c0 commit bea014a

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

uefi/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- Return request with status as error data object for `proto::ata::pass_thru::AtaDevice`.
1414
- **Breaking:** `proto::network::snp::SimpleNetwork::wait_for_packet` now
1515
returns `Option<Event>` instead of `&Event`.
16+
- `Http::get_mode_data` doesn't consume a parameter anymore and instead return
17+
an owned value of type `HttpConfigData`
1618

1719
# uefi - v0.36.1 (2025-11-05)
1820

uefi/src/proto/network/http.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ pub struct Http(HttpProtocol);
3131

3232
impl Http {
3333
/// Receive HTTP Protocol configuration.
34-
pub fn get_mode_data(&mut self, config_data: &mut HttpConfigData) -> uefi::Result<()> {
35-
let status = unsafe { (self.0.get_mode_data)(&mut self.0, config_data) };
34+
pub fn get_mode_data(&mut self) -> uefi::Result<HttpConfigData> {
35+
let mut config_data = HttpConfigData::default();
36+
let status = unsafe { (self.0.get_mode_data)(&mut self.0, &mut config_data) };
3637
match status {
37-
Status::SUCCESS => Ok(()),
38+
Status::SUCCESS => Ok(config_data),
3839
_ => Err(status.into()),
3940
}
4041
}

0 commit comments

Comments
 (0)