authorgravatar for truemedian@gmail.comNameless <truemedian@gmail.com> 2021-06-27 13:34:44-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-03 15:28:57-07:00
logde028d513082a64b4188a958d738d15f247f14ab
tree5f63da7c21488641ffe9d4847b8b8c2322cac441
parent390a4ded986237381fffbe46719445b6cd9733f3

std/os/uefi: fix packed struct bitfields


4 files changed, 23 insertions(+), 8 deletions(-)

lib/std/os/uefi/protocols/absolute_pointer_protocol.zig+6-2
......@@ -45,7 +45,9 @@ pub const AbsolutePointerMode = extern struct {
4545 attributes: packed struct {
4646 supports_alt_active: bool,
4747 supports_pressure_as_z: bool,
48 _pad1: u30,
48 _pad1: u6,
49 _pad2: u8,
50 _pad3: u16,
4951 },
5052};
5153
......@@ -56,6 +58,8 @@ pub const AbsolutePointerState = extern struct {
5658 active_buttons: packed struct {
5759 touch_active: bool,
5860 alt_active: bool,
59 _pad1: u30,
61 _pad1: u6,
62 _pad2: u8,
63 _pad3: u16,
6064 },
6165};
lib/std/os/uefi/protocols/edid_override_protocol.zig+3-1
......@@ -31,5 +31,7 @@ pub const EdidOverrideProtocol = extern struct {
3131pub const EdidOverrideProtocolAttributes = packed struct {
3232 dont_override: bool,
3333 enable_hot_plug: bool,
34 _pad1: u30,
34 _pad1: u6,
35 _pad2: u8,
36 _pad3: u16,
3537};
lib/std/os/uefi/protocols/simple_network_protocol.zig+6-2
......@@ -131,7 +131,9 @@ pub const SimpleNetworkReceiveFilter = packed struct {
131131 receive_broadcast: bool,
132132 receive_promiscuous: bool,
133133 receive_promiscuous_multicast: bool,
134 _pad: u27 = undefined,
134 _pad1: u3 = undefined,
135 _pad2: u8 = undefined,
136 _pad3: u16 = undefined,
135137};
136138
137139pub const SimpleNetworkState = enum(u32) {
......@@ -174,5 +176,7 @@ pub const SimpleNetworkInterruptStatus = packed struct {
174176 transmit_interrupt: bool,
175177 command_interrupt: bool,
176178 software_interrupt: bool,
177 _pad: u28,
179 _pad1: u4,
180 _pad2: u8,
181 _pad3: u16,
178182};
lib/std/os/uefi/tables/boot_services.zig+8-3
......@@ -192,7 +192,8 @@ pub const MemoryDescriptor = extern struct {
192192 wt: bool,
193193 wb: bool,
194194 uce: bool,
195 _pad1: u7,
195 _pad1: u3,
196 _pad2: u4,
196197 wp: bool,
197198 rp: bool,
198199 xp: bool,
......@@ -201,7 +202,9 @@ pub const MemoryDescriptor = extern struct {
201202 ro: bool,
202203 sp: bool,
203204 cpu_crypto: bool,
204 _pad2: u43,
205 _pad3: u4,
206 _pad4: u32,
207 _pad5: u7,
205208 memory_runtime: bool,
206209 },
207210};
......@@ -219,7 +222,9 @@ pub const OpenProtocolAttributes = packed struct {
219222 by_child_controller: bool = false,
220223 by_driver: bool = false,
221224 exclusive: bool = false,
222 _pad: u26 = undefined,
225 _pad1: u2 = undefined,
226 _pad2: u8 = undefined,
227 _pad3: u16 = undefined,
223228};
224229
225230pub const ProtocolInformationEntry = extern struct {