mirror of
https://github.com/systemd/systemd.git
synced 2025-02-23 13:57:33 +03:00
efi: constify several arguments of functions which handle loader entries
This commit is contained in:
parent
cfb7fa289d
commit
ca474d5114
@ -91,7 +91,7 @@ static VOID cursor_right(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN line_edit(
|
static BOOLEAN line_edit(
|
||||||
CHAR16 *line_in,
|
const CHAR16 *line_in,
|
||||||
CHAR16 **line_out,
|
CHAR16 **line_out,
|
||||||
UINTN x_max,
|
UINTN x_max,
|
||||||
UINTN y_pos) {
|
UINTN y_pos) {
|
||||||
@ -916,14 +916,13 @@ static VOID config_entry_free(ConfigEntry *entry) {
|
|||||||
|
|
||||||
static CHAR8 *line_get_key_value(
|
static CHAR8 *line_get_key_value(
|
||||||
CHAR8 *content,
|
CHAR8 *content,
|
||||||
CHAR8 *sep,
|
const CHAR8 *sep,
|
||||||
UINTN *pos,
|
UINTN *pos,
|
||||||
CHAR8 **key_ret,
|
CHAR8 **key_ret,
|
||||||
CHAR8 **value_ret) {
|
CHAR8 **value_ret) {
|
||||||
|
|
||||||
CHAR8 *line;
|
CHAR8 *line, *value;
|
||||||
UINTN linelen;
|
UINTN linelen;
|
||||||
CHAR8 *value;
|
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
line = content + *pos;
|
line = content + *pos;
|
||||||
@ -1073,9 +1072,9 @@ static VOID config_defaults_load_from_file(Config *config, CHAR8 *content) {
|
|||||||
|
|
||||||
static VOID config_entry_parse_tries(
|
static VOID config_entry_parse_tries(
|
||||||
ConfigEntry *entry,
|
ConfigEntry *entry,
|
||||||
CHAR16 *path,
|
const CHAR16 *path,
|
||||||
CHAR16 *file,
|
const CHAR16 *file,
|
||||||
CHAR16 *suffix) {
|
const CHAR16 *suffix) {
|
||||||
|
|
||||||
UINTN left = UINTN_MAX, done = UINTN_MAX, factor = 1, i, next_left, next_done;
|
UINTN left = UINTN_MAX, done = UINTN_MAX, factor = 1, i, next_left, next_done;
|
||||||
_cleanup_freepool_ CHAR16 *prefix = NULL;
|
_cleanup_freepool_ CHAR16 *prefix = NULL;
|
||||||
@ -1259,10 +1258,10 @@ static VOID config_entry_add_from_file(
|
|||||||
Config *config,
|
Config *config,
|
||||||
EFI_HANDLE *device,
|
EFI_HANDLE *device,
|
||||||
EFI_FILE *root_dir,
|
EFI_FILE *root_dir,
|
||||||
CHAR16 *path,
|
const CHAR16 *path,
|
||||||
CHAR16 *file,
|
const CHAR16 *file,
|
||||||
CHAR8 *content,
|
CHAR8 *content,
|
||||||
CHAR16 *loaded_image_path) {
|
const CHAR16 *loaded_image_path) {
|
||||||
|
|
||||||
ConfigEntry *entry;
|
ConfigEntry *entry;
|
||||||
CHAR8 *line;
|
CHAR8 *line;
|
||||||
@ -1689,8 +1688,8 @@ static VOID config_title_generate(Config *config) {
|
|||||||
|
|
||||||
static BOOLEAN config_entry_add_call(
|
static BOOLEAN config_entry_add_call(
|
||||||
Config *config,
|
Config *config,
|
||||||
CHAR16 *id,
|
const CHAR16 *id,
|
||||||
CHAR16 *title,
|
const CHAR16 *title,
|
||||||
EFI_STATUS (*call)(VOID)) {
|
EFI_STATUS (*call)(VOID)) {
|
||||||
|
|
||||||
ConfigEntry *entry;
|
ConfigEntry *entry;
|
||||||
@ -1713,11 +1712,11 @@ static ConfigEntry *config_entry_add_loader(
|
|||||||
Config *config,
|
Config *config,
|
||||||
EFI_HANDLE *device,
|
EFI_HANDLE *device,
|
||||||
enum loader_type type,
|
enum loader_type type,
|
||||||
CHAR16 *id,
|
const CHAR16 *id,
|
||||||
CHAR16 key,
|
CHAR16 key,
|
||||||
CHAR16 *title,
|
const CHAR16 *title,
|
||||||
CHAR16 *loader,
|
const CHAR16 *loader,
|
||||||
CHAR16 *version) {
|
const CHAR16 *version) {
|
||||||
|
|
||||||
ConfigEntry *entry;
|
ConfigEntry *entry;
|
||||||
|
|
||||||
@ -1744,11 +1743,11 @@ static BOOLEAN config_entry_add_loader_auto(
|
|||||||
Config *config,
|
Config *config,
|
||||||
EFI_HANDLE *device,
|
EFI_HANDLE *device,
|
||||||
EFI_FILE *root_dir,
|
EFI_FILE *root_dir,
|
||||||
CHAR16 *loaded_image_path,
|
const CHAR16 *loaded_image_path,
|
||||||
CHAR16 *id,
|
const CHAR16 *id,
|
||||||
CHAR16 key,
|
CHAR16 key,
|
||||||
CHAR16 *title,
|
const CHAR16 *title,
|
||||||
CHAR16 *loader) {
|
const CHAR16 *loader) {
|
||||||
|
|
||||||
EFI_FILE_HANDLE handle;
|
EFI_FILE_HANDLE handle;
|
||||||
ConfigEntry *entry;
|
ConfigEntry *entry;
|
||||||
@ -1774,7 +1773,7 @@ static BOOLEAN config_entry_add_loader_auto(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check existence */
|
/* check existence */
|
||||||
err = uefi_call_wrapper(root_dir->Open, 5, root_dir, &handle, loader, EFI_FILE_MODE_READ, 0ULL);
|
err = uefi_call_wrapper(root_dir->Open, 5, root_dir, &handle, (CHAR16*) loader, EFI_FILE_MODE_READ, 0ULL);
|
||||||
if (EFI_ERROR(err))
|
if (EFI_ERROR(err))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
uefi_call_wrapper(handle->Close, 1, handle);
|
uefi_call_wrapper(handle->Close, 1, handle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user