std.os.uefi: Adjust casing to match style guide in a few places

This commit is contained in:
Linus Groh 2025-02-08 21:01:27 +00:00
parent 88d42b6ae9
commit 0874be1492
6 changed files with 24 additions and 24 deletions

View File

@ -110,8 +110,8 @@ pub const ManagedNetwork = extern struct {
event: Event,
status: Status,
packet: extern union {
RxData: *ReceiveData,
TxData: *TransmitData,
rx_data: *ReceiveData,
tx_data: *TransmitData,
},
};

View File

@ -21,8 +21,8 @@ pub const SerialIo = extern struct {
}
/// Sets the baud rate, receive FIFO depth, transmit/receive time out, parity, data bits, and stop bits on a serial device.
pub fn setAttribute(self: *const SerialIo, baudRate: u64, receiverFifoDepth: u32, timeout: u32, parity: ParityType, dataBits: u8, stopBits: StopBitsType) Status {
return self._set_attribute(self, baudRate, receiverFifoDepth, timeout, parity, dataBits, stopBits);
pub fn setAttribute(self: *const SerialIo, baud_rate: u64, receiver_fifo_depth: u32, timeout: u32, parity: ParityType, data_bits: u8, stop_bits: StopBitsType) Status {
return self._set_attribute(self, baud_rate, receiver_fifo_depth, timeout, parity, data_bits, stop_bits);
}
/// Sets the control bits on a serial device.
@ -36,13 +36,13 @@ pub const SerialIo = extern struct {
}
/// Writes data to a serial device.
pub fn write(self: *const SerialIo, bufferSize: *usize, buffer: *anyopaque) Status {
return self._write(self, bufferSize, buffer);
pub fn write(self: *const SerialIo, buffer_size: *usize, buffer: *anyopaque) Status {
return self._write(self, buffer_size, buffer);
}
/// Reads data from a serial device.
pub fn read(self: *const SerialIo, bufferSize: *usize, buffer: *anyopaque) Status {
return self._read(self, bufferSize, buffer);
pub fn read(self: *const SerialIo, buffer_size: *usize, buffer: *anyopaque) Status {
return self._read(self, buffer_size, buffer);
}
pub const guid align(8) = Guid{

View File

@ -71,10 +71,10 @@ pub const Udp6 = extern struct {
pub const CompletionToken = extern struct {
event: Event,
Status: usize,
status: usize,
packet: extern union {
RxData: *ReceiveData,
TxData: *TransmitData,
rx_data: *ReceiveData,
tx_data: *TransmitData,
},
};

View File

@ -95,17 +95,17 @@ pub const AllocateType = enum(u32) {
pub const EfiPhysicalAddress = u64;
pub const CapsuleHeader = extern struct {
capsuleGuid: Guid align(8),
headerSize: u32,
capsule_guid: Guid align(8),
header_size: u32,
flags: u32,
capsuleImageSize: u32,
capsule_image_size: u32,
};
pub const UefiCapsuleBlockDescriptor = extern struct {
length: u64,
address: extern union {
dataBlock: EfiPhysicalAddress,
continuationPointer: EfiPhysicalAddress,
data_block: EfiPhysicalAddress,
continuation_pointer: EfiPhysicalAddress,
},
};

View File

@ -44,7 +44,7 @@ pub const BootServices = extern struct {
freePages: *const fn (memory: [*]align(4096) u8, pages: usize) callconv(cc) Status,
/// Returns the current memory map.
getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(cc) Status,
getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, map_key: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(cc) Status,
/// Allocates pool memory.
allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(cc) Status,
@ -53,10 +53,10 @@ pub const BootServices = extern struct {
freePool: *const fn (buffer: [*]align(8) u8) callconv(cc) Status,
/// Creates an event.
createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(cc) void, notifyCtx: ?*const anyopaque, event: *Event) callconv(cc) Status,
createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(cc) void, notify_ctx: ?*const anyopaque, event: *Event) callconv(cc) Status,
/// Sets the type of timer and the trigger time for a timer event.
setTimer: *const fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(cc) Status,
setTimer: *const fn (event: Event, type: TimerDelay, trigger_time: u64) callconv(cc) Status,
/// Stops execution until an event is signaled.
waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(cc) Status,
@ -91,7 +91,7 @@ pub const BootServices = extern struct {
registerProtocolNotify: *const fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(cc) Status,
/// Returns an array of handles that support a specified protocol.
locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(cc) Status,
locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, buffer_size: *usize, buffer: [*]Handle) callconv(cc) Status,
/// Locates the handle to a device on the device path that supports the specified protocol
locateDevicePath: *const fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(cc) Status,
@ -100,7 +100,7 @@ pub const BootServices = extern struct {
installConfigurationTable: *const fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(cc) Status,
/// Loads an EFI image into memory.
loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(cc) Status,
loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, image_handle: *?Handle) callconv(cc) Status,
/// Transfers control to a loaded image's entry point.
startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(cc) Status,
@ -121,7 +121,7 @@ pub const BootServices = extern struct {
stall: *const fn (microseconds: usize) callconv(cc) Status,
/// Sets the system's watchdog timer.
setWatchdogTimer: *const fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(cc) Status,
setWatchdogTimer: *const fn (timeout: usize, watchdog_code: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(cc) Status,
/// Connects one or more drives to a controller.
connectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(cc) Status,
@ -133,7 +133,7 @@ pub const BootServices = extern struct {
openProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(cc) Status,
/// Closes a protocol on a handle that was opened using openProtocol().
closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(cc) Status,
closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agent_handle: Handle, controller_handle: ?Handle) callconv(cc) Status,
/// Retrieves the list of agents that currently have a protocol interface opened.
openProtocolInformation: *const fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(cc) Status,

View File

@ -63,7 +63,7 @@ pub const RuntimeServices = extern struct {
updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(cc) Status,
/// Returns if the capsule can be supported via `updateCapsule`
queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(cc) Status,
queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: ResetType) callconv(cc) Status,
/// Returns information about the EFI variables
queryVariableInfo: *const fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(cc) Status,