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 {...@@ -7,7 +7,7 @@ pub const BlockIo = extern struct {
7 const Self = @This();7 const Self = @This();
88
9 revision: u64,9 revision: u64,
10 media: *EfiBlockMedia,10 media: *BlockMedia,
1111
12 _reset: *const fn (*BlockIo, extended_verification: bool) callconv(cc) Status,12 _reset: *const fn (*BlockIo, extended_verification: bool) callconv(cc) Status,
13 _read_blocks: *const fn (*BlockIo, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(cc) Status,13 _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 {...@@ -43,7 +43,7 @@ pub const BlockIo = extern struct {
43 .node = [_]u8{ 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b },43 .node = [_]u8{ 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b },
44 };44 };
4545
46 pub const EfiBlockMedia = extern struct {46 pub const BlockMedia = extern struct {
47 /// The current media ID. If the media changes, this value is changed.47 /// The current media ID. If the media changes, this value is changed.
48 media_id: u32,48 media_id: u32,
4949
lib/std/os/uefi/status.zig+2-2
...@@ -142,7 +142,7 @@ pub const Status = enum(usize) {...@@ -142,7 +142,7 @@ pub const Status = enum(usize) {
142142
143 _,143 _,
144144
145 pub const EfiError = error{145 pub const Error = error{
146 LoadError,146 LoadError,
147 InvalidParameter,147 InvalidParameter,
148 Unsupported,148 Unsupported,
...@@ -185,7 +185,7 @@ pub const Status = enum(usize) {...@@ -185,7 +185,7 @@ pub const Status = enum(usize) {
185 ConnectionRefused,185 ConnectionRefused,
186 };186 };
187187
188 pub fn err(self: Status) EfiError!void {188 pub fn err(self: Status) Error!void {
189 switch (self) {189 switch (self) {
190 .load_error => return error.LoadError,190 .load_error => return error.LoadError,
191 .invalid_parameter => return error.InvalidParameter,191 .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...@@ -4,7 +4,7 @@ pub const ConfigurationTable = @import("tables/configuration_table.zig").Configu
4pub const SystemTable = @import("tables/system_table.zig").SystemTable;4pub const SystemTable = @import("tables/system_table.zig").SystemTable;
5pub const TableHeader = @import("tables/table_header.zig").TableHeader;5pub 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
9pub const TimerDelay = enum(u32) {9pub const TimerDelay = enum(u32) {
10 timer_cancel,10 timer_cancel,
...@@ -82,7 +82,7 @@ pub const ProtocolInformationEntry = extern struct {...@@ -82,7 +82,7 @@ pub const ProtocolInformationEntry = extern struct {
82 open_count: u32,82 open_count: u32,
83};83};
8484
85pub const EfiInterfaceType = enum(u32) {85pub const InterfaceType = enum(u32) {
86 efi_native_interface,86 efi_native_interface,
87};87};
8888
...@@ -92,7 +92,7 @@ pub const AllocateType = enum(u32) {...@@ -92,7 +92,7 @@ pub const AllocateType = enum(u32) {
92 allocate_address,92 allocate_address,
93};93};
9494
95pub const EfiPhysicalAddress = u64;95pub const PhysicalAddress = u64;
9696
97pub const CapsuleHeader = extern struct {97pub const CapsuleHeader = extern struct {
98 capsule_guid: Guid align(8),98 capsule_guid: Guid align(8),
...@@ -104,8 +104,8 @@ pub const CapsuleHeader = extern struct {...@@ -104,8 +104,8 @@ pub const CapsuleHeader = extern struct {
104pub const UefiCapsuleBlockDescriptor = extern struct {104pub const UefiCapsuleBlockDescriptor = extern struct {
105 length: u64,105 length: u64,
106 address: extern union {106 address: extern union {
107 data_block: EfiPhysicalAddress,107 data_block: PhysicalAddress,
108 continuation_pointer: EfiPhysicalAddress,108 continuation_pointer: PhysicalAddress,
109 },109 },
110};110};
111111
lib/std/os/uefi/tables/boot_services.zig+4-4
...@@ -10,11 +10,11 @@ const AllocateType = uefi.tables.AllocateType;...@@ -10,11 +10,11 @@ const AllocateType = uefi.tables.AllocateType;
10const MemoryType = uefi.tables.MemoryType;10const MemoryType = uefi.tables.MemoryType;
11const MemoryDescriptor = uefi.tables.MemoryDescriptor;11const MemoryDescriptor = uefi.tables.MemoryDescriptor;
12const TimerDelay = uefi.tables.TimerDelay;12const TimerDelay = uefi.tables.TimerDelay;
13const EfiInterfaceType = uefi.tables.EfiInterfaceType;13const InterfaceType = uefi.tables.InterfaceType;
14const LocateSearchType = uefi.tables.LocateSearchType;14const LocateSearchType = uefi.tables.LocateSearchType;
15const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes;15const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes;
16const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry;16const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry;
17const EfiEventNotify = uefi.tables.EfiEventNotify;17const EventNotify = uefi.tables.EventNotify;
18const cc = uefi.cc;18const cc = uefi.cc;
1919
20/// Boot services are services provided by the system's firmware until the operating system takes20/// Boot services are services provided by the system's firmware until the operating system takes
...@@ -73,7 +73,7 @@ pub const BootServices = extern struct {...@@ -73,7 +73,7 @@ pub const BootServices = extern struct {
73 /// Installs a protocol interface on a device handle. If the handle does not exist, it is created73 /// Installs a protocol interface on a device handle. If the handle does not exist, it is created
74 /// and added to the list of handles in the system. installMultipleProtocolInterfaces()74 /// and added to the list of handles in the system. installMultipleProtocolInterfaces()
75 /// performs more error checking than installProtocolInterface(), so its use is recommended over this.75 /// 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
78 /// Reinstalls a protocol interface on a device handle78 /// Reinstalls a protocol interface on a device handle
79 reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(cc) Status,79 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 {...@@ -165,7 +165,7 @@ pub const BootServices = extern struct {
165 setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void,165 setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void,
166166
167 /// Creates an event in a group.167 /// 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
170 /// Opens a protocol with a structure as the loaded image for a UEFI application170 /// Opens a protocol with a structure as the loaded image for a UEFI application
171 pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol {171 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;...@@ -8,7 +8,7 @@ const Status = uefi.Status;
8const MemoryDescriptor = uefi.tables.MemoryDescriptor;8const MemoryDescriptor = uefi.tables.MemoryDescriptor;
9const ResetType = uefi.tables.ResetType;9const ResetType = uefi.tables.ResetType;
10const CapsuleHeader = uefi.tables.CapsuleHeader;10const CapsuleHeader = uefi.tables.CapsuleHeader;
11const EfiPhysicalAddress = uefi.tables.EfiPhysicalAddress;11const PhysicalAddress = uefi.tables.PhysicalAddress;
12const cc = uefi.cc;12const cc = uefi.cc;
1313
14/// Runtime services are provided by the firmware before and after exitBootServices has been called.14/// Runtime services are provided by the firmware before and after exitBootServices has been called.
...@@ -60,7 +60,7 @@ pub const RuntimeServices = extern struct {...@@ -60,7 +60,7 @@ pub const RuntimeServices = extern struct {
60 /// If the payload should persist across a system reset, the reset value returned from60 /// If the payload should persist across a system reset, the reset value returned from
61 /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule61 /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule
62 /// to be processed by the firmware as part of the reset process.62 /// 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
65 /// Returns if the capsule can be supported via `updateCapsule`65 /// Returns if the capsule can be supported via `updateCapsule`
66 queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: ResetType) callconv(cc) Status,66 queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: ResetType) callconv(cc) Status,