kboot: Fix an off by one error

Fix an off-by-one error that would mean we'd get stuck on the newline if
ACPI= wasn't first.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D39817
This commit is contained in:
Warner Losh 2023-05-01 15:12:24 -06:00
parent cf6044857e
commit facd0edbb2

View File

@ -168,7 +168,7 @@ kboot_rsdp_from_efi(void)
return((vm_offset_t)strtoull(walker + 7, NULL, 0));
if (strncmp("ACPI=", walker, 5) == 0)
return((vm_offset_t)strtoull(walker + 5, NULL, 0));
walker += strcspn(walker, "\n");
walker += strcspn(walker, "\n") + 1;
}
return (0);
}