authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-02-09 02:30:32+00:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-02-09 02:30:32+00:00
log0660f5b5213d90a22be0df3583945fb69d566615
treea49312b1802f89c3e63edcb7a8548c68fdd637ff
parent0a7502e8869bace1c3ba4f94ac8f1e001a6edb2a

std.os.uefi: Drop 'Efi' prefix from type names

The UEFI spec only does this because C doesn't have namespaces, we don't have that problem. Most type names were already omitting the prefix.

5 files changed, 15 insertions(+), 15 deletions(-)

lib/std/os/uefi/protocol/block_io.zig+2-2
......@@ -7,7 +7,7 @@ pub const BlockIo = extern struct {
77 const Self = @This();
88
99 revision: u64,
10 media: *EfiBlockMedia,
10 media: *BlockMedia,
1111
1212 _reset: *const fn (*BlockIo, extended_verification: bool) callconv(cc) Status,
1313 _read_blocks: *const fn (*BlockIo, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(cc) Status,
......@@ -43,7 +43,7 @@ pub const BlockIo = extern struct {
4343 .node = [_]u8{ 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b },
4444 };
4545
46 pub const EfiBlockMedia = extern struct {
46 pub const BlockMedia = extern struct {
4747 /// The current media ID. If the media changes, this value is changed.
4848 media_id: u32,
4949
lib/std/os/uefi/status.zig+2-2
......@@ -142,7 +142,7 @@ pub const Status = enum(usize) {
142142
143143 _,
144144
145 pub const EfiError = error{
145 pub const Error = error{
146146 LoadError,
147147 InvalidParameter,
148148 Unsupported,
......@@ -185,7 +185,7 @@ pub const Status = enum(usize) {
185185 ConnectionRefused,
186186 };
187187
188 pub fn err(self: Status) EfiError!void {
188 pub fn err(self: Status) Error!void {
189189 switch (self) {
190190 .load_error => return error.LoadError,
191191 .invalid_parameter => return error.InvalidParameter,
lib/std/os/uefi/tables.zig+5-5
......@@ -4,7 +4,7 @@ pub const ConfigurationTable = @import("tables/configuration_table.zig").Configu
44pub const SystemTable = @import("tables/system_table.zig").SystemTable;
55pub const TableHeader = @import("tables/table_header.zig").TableHeader;
66
7pub const EfiEventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void;
7pub const EventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void;
88
99pub const TimerDelay = enum(u32) {
1010 timer_cancel,
......@@ -82,7 +82,7 @@ pub const ProtocolInformationEntry = extern struct {
8282 open_count: u32,
8383};
8484
85pub const EfiInterfaceType = enum(u32) {
85pub const InterfaceType = enum(u32) {
8686 efi_native_interface,
8787};
8888
......@@ -92,7 +92,7 @@ pub const AllocateType = enum(u32) {
9292 allocate_address,
9393};
9494
95pub const EfiPhysicalAddress = u64;
95pub const PhysicalAddress = u64;
9696
9797pub const CapsuleHeader = extern struct {
9898 capsule_guid: Guid align(8),
......@@ -104,8 +104,8 @@ pub const CapsuleHeader = extern struct {
104104pub const UefiCapsuleBlockDescriptor = extern struct {
105105 length: u64,
106106 address: extern union {
107 data_block: EfiPhysicalAddress,
108 continuation_pointer: EfiPhysicalAddress,
107 data_block: PhysicalAddress,
108 continuation_pointer: PhysicalAddress,
109109 },
110110};
111111
lib/std/os/uefi/tables/boot_services.zig+4-4
......@@ -10,11 +10,11 @@ const AllocateType = uefi.tables.AllocateType;
1010const MemoryType = uefi.tables.MemoryType;
1111const MemoryDescriptor = uefi.tables.MemoryDescriptor;
1212const TimerDelay = uefi.tables.TimerDelay;
13const EfiInterfaceType = uefi.tables.EfiInterfaceType;
13const InterfaceType = uefi.tables.InterfaceType;
1414const LocateSearchType = uefi.tables.LocateSearchType;
1515const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes;
1616const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry;
17const EfiEventNotify = uefi.tables.EfiEventNotify;
17const EventNotify = uefi.tables.EventNotify;
1818const cc = uefi.cc;
1919
2020/// Boot services are services provided by the system's firmware until the operating system takes
......@@ -73,7 +73,7 @@ pub const BootServices = extern struct {
7373 /// Installs a protocol interface on a device handle. If the handle does not exist, it is created
7474 /// and added to the list of handles in the system. installMultipleProtocolInterfaces()
7575 /// performs more error checking than installProtocolInterface(), so its use is recommended over this.
76 installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(cc) Status,
76 installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: InterfaceType, interface: *anyopaque) callconv(cc) Status,
7777
7878 /// Reinstalls a protocol interface on a device handle
7979 reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(cc) Status,
......@@ -165,7 +165,7 @@ pub const BootServices = extern struct {
165165 setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void,
166166
167167 /// Creates an event in a group.
168 createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(cc) Status,
168 createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(cc) Status,
169169
170170 /// Opens a protocol with a structure as the loaded image for a UEFI application
171171 pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol {
lib/std/os/uefi/tables/runtime_services.zig+2-2
......@@ -8,7 +8,7 @@ const Status = uefi.Status;
88const MemoryDescriptor = uefi.tables.MemoryDescriptor;
99const ResetType = uefi.tables.ResetType;
1010const CapsuleHeader = uefi.tables.CapsuleHeader;
11const EfiPhysicalAddress = uefi.tables.EfiPhysicalAddress;
11const PhysicalAddress = uefi.tables.PhysicalAddress;
1212const cc = uefi.cc;
1313
1414/// Runtime services are provided by the firmware before and after exitBootServices has been called.
......@@ -60,7 +60,7 @@ pub const RuntimeServices = extern struct {
6060 /// If the payload should persist across a system reset, the reset value returned from
6161 /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule
6262 /// to be processed by the firmware as part of the reset process.
63 updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(cc) Status,
63 updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: PhysicalAddress) callconv(cc) Status,
6464
6565 /// Returns if the capsule can be supported via `updateCapsule`
6666 queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: ResetType) callconv(cc) Status,