EFI: move pre_parse() back next to get_value()

These are siblings, so better would live close together. Sadly in
1f9540cd8e ("EFI: move efi-boot.h inclusion point") I moved get_value()
without also moving pre_parse().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
This commit is contained in:
Jan Beulich committed 2026-04-07 09:00:01 +02:00
1 parent df75f77092
commit 97bd7f26f6
1 file changed
+25 -25
+25 -25
View File
@@ -581,6 +581,31 @@ static char * __init split_string(char *s)
return NULL;
}
static void __init pre_parse(const struct file *file)
{
char *ptr = file->str, *end = ptr + file->size;
bool start = true, comment = false;
for ( ; ptr < end; ++ptr )
{
if ( iscntrl(*ptr) )
{
comment = false;
start = true;
*ptr = 0;
}
else if ( comment || (start && isspace(*ptr)) )
*ptr = 0;
else if ( *ptr == '#' || (start && *ptr == ';') )
{
comment = true;
*ptr = 0;
}
else
start = 0;
}
}
static char *__init get_value(const struct file *file, const char *section,
const char *item)
{
@@ -904,31 +929,6 @@ static bool __init read_section(const EFI_LOADED_IMAGE *image,
return true;
}
static void __init pre_parse(const struct file *file)
{
char *ptr = file->str, *end = ptr + file->size;
bool start = true, comment = false;
for ( ; ptr < end; ++ptr )
{
if ( iscntrl(*ptr) )
{
comment = false;
start = true;
*ptr = 0;
}
else if ( comment || (start && isspace(*ptr)) )
*ptr = 0;
else if ( *ptr == '#' || (start && *ptr == ';') )
{
comment = true;
*ptr = 0;
}
else
start = 0;
}
}
static void __init init_secure_boot_mode(void)
{
static EFI_GUID __initdata gv_uuid = EFI_GLOBAL_VARIABLE;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.