| author | |
| committer | |
| log | 0660f5b5213d90a22be0df3583945fb69d566615 |
| tree | a49312b1802f89c3e63edcb7a8548c68fdd637ff |
| parent | 0a7502e8869bace1c3ba4f94ac8f1e001a6edb2a |
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(); |
| 8 | 8 | ||
| 9 | revision: u64, | 9 | revision: u64, |
| 10 | media: *EfiBlockMedia, | 10 | media: *BlockMedia, |
| 11 | 11 | ||
| 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 | }; |
| 45 | 45 | ||
| 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, |
| 49 | 49 |
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) { |
| 142 | 142 | ||
| 143 | _, | 143 | _, |
| 144 | 144 | ||
| 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 | }; |
| 187 | 187 | ||
| 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 |
| 4 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; | 4 | pub const SystemTable = @import("tables/system_table.zig").SystemTable; |
| 5 | pub const TableHeader = @import("tables/table_header.zig").TableHeader; | 5 | pub const TableHeader = @import("tables/table_header.zig").TableHeader; |
| 6 | 6 | ||
| 7 | pub const EfiEventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void; | 7 | pub const EventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void; |
| 8 | 8 | ||
| 9 | pub const TimerDelay = enum(u32) { | 9 | pub 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 | }; |
| 84 | 84 | ||
| 85 | pub const EfiInterfaceType = enum(u32) { | 85 | pub const InterfaceType = enum(u32) { |
| 86 | efi_native_interface, | 86 | efi_native_interface, |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| ... | @@ -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 | }; |
| 94 | 94 | ||
| 95 | pub const EfiPhysicalAddress = u64; | 95 | pub const PhysicalAddress = u64; |
| 96 | 96 | ||
| 97 | pub const CapsuleHeader = extern struct { | 97 | pub 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 { |
| 104 | pub const UefiCapsuleBlockDescriptor = extern struct { | 104 | pub 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 | }; |
| 111 | 111 |
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; |
| 10 | const MemoryType = uefi.tables.MemoryType; | 10 | const MemoryType = uefi.tables.MemoryType; |
| 11 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; | 11 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; |
| 12 | const TimerDelay = uefi.tables.TimerDelay; | 12 | const TimerDelay = uefi.tables.TimerDelay; |
| 13 | const EfiInterfaceType = uefi.tables.EfiInterfaceType; | 13 | const InterfaceType = uefi.tables.InterfaceType; |
| 14 | const LocateSearchType = uefi.tables.LocateSearchType; | 14 | const LocateSearchType = uefi.tables.LocateSearchType; |
| 15 | const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes; | 15 | const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes; |
| 16 | const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry; | 16 | const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry; |
| 17 | const EfiEventNotify = uefi.tables.EfiEventNotify; | 17 | const EventNotify = uefi.tables.EventNotify; |
| 18 | const cc = uefi.cc; | 18 | const cc = uefi.cc; |
| 19 | 19 | ||
| 20 | /// Boot services are services provided by the system's firmware until the operating system takes | 20 | /// 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 created | 73 | /// 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, |
| 77 | 77 | ||
| 78 | /// Reinstalls a protocol interface on a device handle | 78 | /// 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, |
| 166 | 166 | ||
| 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, |
| 169 | 169 | ||
| 170 | /// Opens a protocol with a structure as the loaded image for a UEFI application | 170 | /// 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; |
| 8 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; | 8 | const MemoryDescriptor = uefi.tables.MemoryDescriptor; |
| 9 | const ResetType = uefi.tables.ResetType; | 9 | const ResetType = uefi.tables.ResetType; |
| 10 | const CapsuleHeader = uefi.tables.CapsuleHeader; | 10 | const CapsuleHeader = uefi.tables.CapsuleHeader; |
| 11 | const EfiPhysicalAddress = uefi.tables.EfiPhysicalAddress; | 11 | const PhysicalAddress = uefi.tables.PhysicalAddress; |
| 12 | const cc = uefi.cc; | 12 | const cc = uefi.cc; |
| 13 | 13 | ||
| 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 from | 60 | /// 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 capsule | 61 | /// `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, |
| 64 | 64 | ||
| 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, |