|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 for-4.22] EFI: Fix boot from a device without a file system
On 20.05.2026 12:30, Szymon Acedański wrote:
> @@ -1526,31 +1537,33 @@ void EFIAPI __init noreturn efi_start(EFI_HANDLE
> ImageHandle,
>
> gop = efi_get_gop(&gop_handle);
>
> - /* Get the file system interface. */
> - dir_handle = get_parent_handle(loaded_image, &file_name);
> -
> /* Read and parse the config file. */
> if ( read_section(loaded_image, L"config", &cfg, NULL) )
> PrintStr(L"Using builtin config file\r\n");
> - else if ( !cfg_file_name && file_name )
> + else
> {
> - CHAR16 *tail;
> + ensure_dir_handle(loaded_image, &dir_handle, &file_name);
>
> - while ( (tail = point_tail(file_name)) != NULL )
> + if ( !cfg_file_name )
> {
> - wstrcpy(tail, L".cfg");
> - if ( read_file(dir_handle, file_name, &cfg, NULL) )
> - break;
> - *tail = 0;
> + CHAR16 *tail;
> +
> + while ( (tail = point_tail(file_name)) != NULL )
> + {
> + wstrcpy(tail, L".cfg");
> + if ( read_file(dir_handle, file_name, &cfg, NULL) )
> + break;
> + *tail = 0;
> + }
> + if ( !tail )
> + blexit(L"No configuration file found.");
> + PrintStr(L"Using configuration file '");
> + PrintStr(file_name);
> + PrintStr(L"'\r\n");
> }
> - if ( !tail )
> - blexit(L"No configuration file found.");
> - PrintStr(L"Using configuration file '");
> - PrintStr(file_name);
> - PrintStr(L"'\r\n");
> + else if ( !read_file(dir_handle, cfg_file_name, &cfg, NULL) )
> + blexit(L"Configuration file not found.");
> }
> - else if ( !read_file(dir_handle, cfg_file_name, &cfg, NULL) )
> - blexit(L"Configuration file not found.");
> pre_parse(&cfg);
>
> if ( section.w )
Seeing in particular this hunk - why not have read_file() call the new function?
Most of the churn here would then go away.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |