Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions uefi-raw/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Added

## Changed
- **Breaking:** Various uses of `bool` have been replaced with `Boolean`.


# uefi-raw - v0.12 (2025-10-21)
Expand Down
2 changes: 1 addition & 1 deletion uefi-raw/src/protocol/device_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ pub struct DevicePathUtilitiesProtocol {
device_path_instance_size: *mut usize,
) -> *const DevicePathProtocol,
pub is_device_path_multi_instance:
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> bool,
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> Boolean,
pub create_device_node: unsafe extern "efiapi" fn(
node_type: DeviceType,
node_sub_type: DeviceSubType,
Expand Down
4 changes: 2 additions & 2 deletions uefi-raw/src/protocol/hii/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use core::fmt::Debug;

use crate::protocol::device_path::DevicePathProtocol;
use crate::{Char16, Guid, Status, guid, newtype_enum};
use crate::{Boolean, Char16, Guid, Status, guid, newtype_enum};

/// EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
#[derive(Debug)]
Expand Down Expand Up @@ -129,7 +129,7 @@ pub union IfrTypeValue {
pub u16: u16, // EFI_IFR_TYPE_NUM_SIZE_16
pub u32: u32, // EFI_IFR_TYPE_NUM_SIZE_32
pub u64: u64, // EFI_IFR_TYPE_NUM_SIZE_64
pub b: bool, // EFI_IFR_TYPE_BOOLEAN
pub b: Boolean, // EFI_IFR_TYPE_BOOLEAN
pub time: HiiTime, // EFI_IFR_TYPE_TIME
pub date: HiiDate, // EFI_IFR_TYPE_DATE
pub string: StringId, // EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
Expand Down
17 changes: 9 additions & 8 deletions uefi-raw/src/protocol/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use core::ffi::c_void;

use crate::{Char8, Char16, Event, Guid, Handle, Status, guid};
use crate::{Boolean, Char8, Char16, Event, Guid, Handle, Status, guid};

use super::device_path::DevicePathProtocol;
use super::file_system::FileInfo;
Expand Down Expand Up @@ -58,14 +58,15 @@ pub struct ShellProtocol {
pub set_env: unsafe extern "efiapi" fn(
name: *const Char16,
value: *const Char16,
volatile: bool,
volatile: Boolean,
) -> Status,
pub get_alias: unsafe extern "efiapi" fn(alias: *const Char16, volatile: bool) -> *const Char16,
pub get_alias:
unsafe extern "efiapi" fn(alias: *const Char16, volatile: Boolean) -> *const Char16,
pub set_alias: unsafe extern "efiapi" fn(
command: *const Char16,
alias: *const Char16,
replace: bool,
volatile: bool,
replace: Boolean,
volatile: Boolean,
) -> Status,
pub get_help_text: unsafe extern "efiapi" fn(
command: *const Char16,
Expand Down Expand Up @@ -97,11 +98,11 @@ pub struct ShellProtocol {
pub remove_dup_in_file_list:
unsafe extern "efiapi" fn(file_list: *const *const ShellFileInfo) -> Status,

pub batch_is_active: unsafe extern "efiapi" fn() -> bool,
pub is_root_shell: unsafe extern "efiapi" fn() -> bool,
pub batch_is_active: unsafe extern "efiapi" fn() -> Boolean,
pub is_root_shell: unsafe extern "efiapi" fn() -> Boolean,
pub enable_page_break: unsafe extern "efiapi" fn(),
pub disable_page_break: unsafe extern "efiapi" fn(),
pub get_page_break: unsafe extern "efiapi" fn() -> bool,
pub get_page_break: unsafe extern "efiapi" fn() -> Boolean,
pub get_device_name: unsafe extern "efiapi" fn(
device_handle: Handle,
flags: ShellDeviceNameFlags,
Expand Down
6 changes: 3 additions & 3 deletions uefi-raw/src/protocol/string.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{Char8, Char16, Guid, guid};
use crate::{Boolean, Char8, Char16, Guid, guid};

#[derive(Debug)]
#[repr(C)]
Expand All @@ -11,7 +11,7 @@ pub struct UnicodeCollationProtocol {
this: *const Self,
string: *const Char16,
pattern: *const Char16,
) -> bool,
) -> Boolean,
pub str_lwr: unsafe extern "efiapi" fn(this: *const Self, s: *mut Char16),
pub str_upr: unsafe extern "efiapi" fn(this: *const Self, s: *mut Char16),
pub fat_to_str: unsafe extern "efiapi" fn(
Expand All @@ -25,7 +25,7 @@ pub struct UnicodeCollationProtocol {
s: *const Char16,
fat_size: usize,
fat: *mut Char8,
) -> bool,
) -> Boolean,
pub supported_languages: *const Char8,
}

Expand Down
4 changes: 2 additions & 2 deletions uefi/src/proto/string/unicode_collation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl UnicodeCollation {
/// any single character followed by a "." followed by any string.
#[must_use]
pub fn metai_match(&self, s: &CStr16, pattern: &CStr16) -> bool {
unsafe { (self.0.metai_match)(&self.0, s.as_ptr().cast(), pattern.as_ptr().cast()) }
unsafe { (self.0.metai_match)(&self.0, s.as_ptr().cast(), pattern.as_ptr().cast()) }.into()
}

/// Converts the characters in `s` to lower case characters.
Expand Down Expand Up @@ -132,7 +132,7 @@ impl UnicodeCollation {
buf.as_mut_ptr(),
)
};
if failed {
if bool::from(failed) {
Err(StrConversionError::ConversionFailed)
} else {
// After the conversion, there is a possibility that the converted string
Expand Down
Loading