Skip to content

Commit

Permalink
kernel.js: cmdline_size is only valid for linux boot protocol 2.06+
Browse files Browse the repository at this point in the history
  • Loading branch information
rouseabout authored and copy committed Apr 16, 2024
1 parent 2bcfa9d commit 4efc371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function load_kernel(mem8, bzimage, initrd, cmdline)
const kernel_alignment = bzimage32[LINUX_BOOT_HDR_KERNEL_ALIGNMENT >> 2];
const relocatable_kernel = bzimage8[LINUX_BOOT_HDR_RELOCATABLE_KERNEL];
const min_alignment = bzimage8[LINUX_BOOT_HDR_MIN_ALIGNMENT];
const cmdline_size = bzimage32[LINUX_BOOT_HDR_CMDLINE_SIZE >> 2];
const cmdline_size = protocol >= 0x206 ? bzimage32[LINUX_BOOT_HDR_CMDLINE_SIZE >> 2] : 255;
const payload_offset = bzimage32[LINUX_BOOT_HDR_PAYLOAD_OFFSET >> 2];
const payload_length = bzimage32[LINUX_BOOT_HDR_PAYLOAD_LENGTH >> 2];
const pref_address = bzimage32[LINUX_BOOT_HDR_PREF_ADDRESS >> 2];
Expand Down

0 comments on commit 4efc371

Please sign in to comment.