diff options
| author | Bobby <[email protected]> | 2026-02-24 09:28:11 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-24 09:28:11 +0530 |
| commit | d55e3ad67f624a4064c1f864e69809d28770c858 (patch) | |
| tree | 2627b0fab8df64a5d72b43ecda576906d14860e1 | |
| parent | 93ad27d2426618ee254da6b731f18309f2550682 (diff) | |
| download | akiba-d55e3ad67f624a4064c1f864e69809d28770c858.tar.xz akiba-d55e3ad67f624a4064c1f864e69809d28770c858.zip | |
fix: Adjust buffer initialization in print function for correct type handling
| -rw-r--r-- | hikari/disk/gpt/parser.zig | 5 | ||||
| -rw-r--r-- | hikari/efi/constants/guids.zig | 36 | ||||
| -rw-r--r-- | hikari/hikari.zig | 2 |
3 files changed, 23 insertions, 20 deletions
diff --git a/hikari/disk/gpt/parser.zig b/hikari/disk/gpt/parser.zig index 364a27f..6d5b49d 100644 --- a/hikari/disk/gpt/parser.zig +++ b/hikari/disk/gpt/parser.zig @@ -165,7 +165,10 @@ pub const Parser = struct { } }; -const crc32_table: [256]u32 = generate_crc32_table(); +const crc32_table: [256]u32 = blk: { + @setEvalBranchQuota(10000); + break :blk generate_crc32_table(); +}; fn generate_crc32_table() [256]u32 { var table: [256]u32 = undefined; diff --git a/hikari/efi/constants/guids.zig b/hikari/efi/constants/guids.zig index a50117f..5f20b38 100644 --- a/hikari/efi/constants/guids.zig +++ b/hikari/efi/constants/guids.zig @@ -3,126 +3,126 @@ const types = @import("../types/types.zig"); const Guid = types.Guid; -pub const loaded_image_protocol = Guid{ +pub const loaded_image_protocol align(8) = Guid{ .time_low = 0x5B1B31A1, .time_mid = 0x9562, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }, }; -pub const simple_unit_system_protocol = Guid{ +pub const simple_unit_system_protocol align(8) = Guid{ .time_low = 0x0964e5b22, .time_mid = 0x6459, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const unit_info = Guid{ +pub const unit_info align(8) = Guid{ .time_low = 0x09576e92, .time_mid = 0x6d3f, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const unit_system_info = Guid{ +pub const unit_system_info align(8) = Guid{ .time_low = 0x09576e93, .time_mid = 0x6d3f, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const graphics_output_protocol = Guid{ +pub const graphics_output_protocol align(8) = Guid{ .time_low = 0x9042a9de, .time_mid = 0x23dc, .time_high_and_version = 0x4a38, .clock_sequence_and_node = .{ 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a }, }; -pub const block_io_protocol = Guid{ +pub const block_io_protocol align(8) = Guid{ .time_low = 0x964e5b21, .time_mid = 0x6459, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const block_io2_protocol = Guid{ +pub const block_io2_protocol align(8) = Guid{ .time_low = 0xa77b2472, .time_mid = 0xe282, .time_high_and_version = 0x4e9f, .clock_sequence_and_node = .{ 0xa2, 0x45, 0xc2, 0xc0, 0xe2, 0x7b, 0xbc, 0xc1 }, }; -pub const disk_io_protocol = Guid{ +pub const disk_io_protocol align(8) = Guid{ .time_low = 0xce345171, .time_mid = 0xba0b, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x4f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const disk_io2_protocol = Guid{ +pub const disk_io2_protocol align(8) = Guid{ .time_low = 0x151c8eae, .time_mid = 0x7f2c, .time_high_and_version = 0x472c, .clock_sequence_and_node = .{ 0x9e, 0x54, 0x98, 0x28, 0x19, 0x4f, 0x6a, 0x88 }, }; -pub const device_location_protocol = Guid{ +pub const device_location_protocol align(8) = Guid{ .time_low = 0x09576e91, .time_mid = 0x6d3f, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const simple_text_input_protocol = Guid{ +pub const simple_text_input_protocol align(8) = Guid{ .time_low = 0x387477c1, .time_mid = 0x69c7, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const simple_text_output_protocol = Guid{ +pub const simple_text_output_protocol align(8) = Guid{ .time_low = 0x387477c2, .time_mid = 0x69c7, .time_high_and_version = 0x11d2, .clock_sequence_and_node = .{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }, }; -pub const acpi_20_table = Guid{ +pub const acpi_20_table align(8) = Guid{ .time_low = 0x8868e871, .time_mid = 0xe4f1, .time_high_and_version = 0x11d3, .clock_sequence_and_node = .{ 0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81 }, }; -pub const acpi_10_table = Guid{ +pub const acpi_10_table align(8) = Guid{ .time_low = 0xeb9d2d30, .time_mid = 0x2d88, .time_high_and_version = 0x11d3, .clock_sequence_and_node = .{ 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; -pub const smbios_table = Guid{ +pub const smbios_table align(8) = Guid{ .time_low = 0xeb9d2d31, .time_mid = 0x2d88, .time_high_and_version = 0x11d3, .clock_sequence_and_node = .{ 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; -pub const smbios3_table = Guid{ +pub const smbios3_table align(8) = Guid{ .time_low = 0xf2fd1544, .time_mid = 0x9794, .time_high_and_version = 0x4a2c, .clock_sequence_and_node = .{ 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 }, }; -pub const gpt_partition_type_efi_system = Guid{ +pub const gpt_partition_type_efi_system align(8) = Guid{ .time_low = 0xC12A7328, .time_mid = 0xF81F, .time_high_and_version = 0x11D2, .clock_sequence_and_node = .{ 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B }, }; -pub const gpt_partition_type_akiba_afs = Guid{ +pub const gpt_partition_type_akiba_afs align(8) = Guid{ .time_low = 0x414B4942, .time_mid = 0x4146, .time_high_and_version = 0x5300, diff --git a/hikari/hikari.zig b/hikari/hikari.zig index 1a3d12a..4136148 100644 --- a/hikari/hikari.zig +++ b/hikari/hikari.zig @@ -213,7 +213,7 @@ fn hikari(image_handle: efi.types.Handle, system_table: *efi.services.SystemTabl fn print(console: *efi.protocols.SimpleTextOutputProtocol, msg: []const u8) void { for (msg) |c| { - var buf: [2]u16 = .{ c, 0 }; + var buf = [2:0]u16{ c, 0 }; _ = console.output_string(console, &buf); } } |
