1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-03 05:18:09 +03:00

boot: Check LoadOptions against FilePath for uki pxe boot

This commit is contained in:
Stefanie Dukovac 2024-12-16 15:17:38 -05:00
parent 1269d75b64
commit d19cc061d0

View File

@ -257,6 +257,16 @@ static void process_arguments(
* it could actually be anything! */
char16_t *c = xstrndup16(loaded_image->LoadOptions, loaded_image->LoadOptionsSize / sizeof(char16_t));
parse_profile_from_cmdline(&c, ret_profile);
/* Ignore LoadOptions if matches loaded image FilePath for uki pxe */
if (loaded_image->FilePath) {
_cleanup_free_ char16_t *s = NULL;
if (device_path_to_str(loaded_image->FilePath, &s) == EFI_SUCCESS && !strcmp16(s, c)) {
mfree(c);
c = NULL;
}
}
*ret_cmdline = mangle_stub_cmdline(c);
return;
}