Merge a76d28f07f45fdc466331cc9c4622bb501fc34cb into b3adfa83ab61682dec6c3834678ca2e9eae43e03

This commit is contained in:
Chen Qi 2025-03-21 11:43:27 -04:00 committed by GitHub
commit a71ad77f78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,6 +114,7 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, int bootver
for (int i = 0; i < boot_loader_configs->len; i++)
{
g_autofree char *index_suffix = NULL;
g_autofree char *bootdir = NULL;
if (i == 0)
index_suffix = g_strdup ("");
else
@ -129,6 +130,9 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, int bootver
}
g_ptr_array_add (new_lines, g_strdup_printf ("kernel_image%s=/boot%s", index_suffix, val));
bootdir = strndup (val, strrchr(val, '/') - val);
g_ptr_array_add (new_lines, g_strdup_printf ("bootdir%s=%s/", index_suffix, bootdir));
val = ostree_bootconfig_parser_get (config, "initrd");
if (val)
g_ptr_array_add (new_lines, g_strdup_printf ("ramdisk_image%s=/boot%s", index_suffix, val));