Skip to content

Commit d08191e

Browse files
authored
Merge pull request #12897 from r00ster91/uefi
std.os.uefi: fix some mistakes
2 parents 7ce1ee1 + 47e7213 commit d08191e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/std/os/uefi/protocols/managed_network_protocol.zig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub const ManagedNetworkProtocol = extern struct {
1515
_transmit: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status),
1616
_receive: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status),
1717
_cancel: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkCompletionToken) callconv(.C) Status),
18-
_poll: std.meta.FnPtr(fn (*const ManagedNetworkProtocol) callconv(.C) usize),
18+
_poll: std.meta.FnPtr(fn (*const ManagedNetworkProtocol) callconv(.C) Status),
1919

2020
/// Returns the operational parameters for the current MNP child driver.
2121
/// May also support returning the underlying SNP driver mode data.
@@ -31,8 +31,7 @@ pub const ManagedNetworkProtocol = extern struct {
3131
/// Translates an IP multicast address to a hardware (MAC) multicast address.
3232
/// This function may be unsupported in some MNP implementations.
3333
pub fn mcastIpToMac(self: *const ManagedNetworkProtocol, ipv6flag: bool, ipaddress: *const anyopaque, mac_address: *MacAddress) Status {
34-
_ = mac_address;
35-
return self._mcast_ip_to_mac(self, ipv6flag, ipaddress);
34+
return self._mcast_ip_to_mac(self, ipv6flag, ipaddress, mac_address);
3635
}
3736

3837
/// Enables and disables receive filters for multicast address.

lib/std/os/uefi/protocols/simple_text_input_ex_protocol.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub const SimpleTextInputExProtocol = extern struct {
1010
_read_key_stroke_ex: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *KeyData) callconv(.C) Status),
1111
wait_for_key_ex: Event,
1212
_set_state: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const u8) callconv(.C) Status),
13-
_register_key_notify: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const KeyData, fn (*const KeyData) callconv(.C) usize, **anyopaque) callconv(.C) Status),
13+
_register_key_notify: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const KeyData, std.meta.FnPtr(fn (*const KeyData) callconv(.C) usize), **anyopaque) callconv(.C) Status),
1414
_unregister_key_notify: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const anyopaque) callconv(.C) Status),
1515

1616
/// Resets the input device hardware.
@@ -29,7 +29,7 @@ pub const SimpleTextInputExProtocol = extern struct {
2929
}
3030

3131
/// Register a notification function for a particular keystroke for the input device.
32-
pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: fn (*const KeyData) callconv(.C) usize, handle: **anyopaque) Status {
32+
pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: std.meta.FnPtr(fn (*const KeyData) callconv(.C) usize), handle: **anyopaque) Status {
3333
return self._register_key_notify(self, key_data, notify, handle);
3434
}
3535

lib/std/os/uefi/tables/boot_services.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub const BootServices = extern struct {
191191
pub const tpl_high_level: usize = 31;
192192
};
193193

194-
pub const EfiEventNotify = fn (event: Event, ctx: *anyopaque) callconv(.C) void;
194+
pub const EfiEventNotify = std.meta.FnPtr(fn (event: Event, ctx: *anyopaque) callconv(.C) void);
195195

196196
pub const TimerDelay = enum(u32) {
197197
TimerCancel,

0 commit comments

Comments
 (0)