diff options
author | Ahmad Khalifa <ahmadkhalifa570@gmail.com> | 2024-08-22 19:07:59 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2025-01-24 21:25:52 +0000 |
commit | 707136024fcc64be5008c793cdbdd05720be0e18 (patch) | |
tree | 91440f3e6bf6ec39974f57cc379531b1fb726974 /stand/common | |
parent | b72ae900d4348118829fe04abdc11b620930c30f (diff) |
stand: remove unnecessary checks for "elfN kernel"
We never set the kernel type to either "elf64 kernel" nor "elf32
kernel".
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
Diffstat (limited to 'stand/common')
-rw-r--r-- | stand/common/bootstrap.h | 2 | ||||
-rw-r--r-- | stand/common/gfx_fb.c | 4 | ||||
-rw-r--r-- | stand/common/metadata.c | 4 |
3 files changed, 2 insertions, 8 deletions
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 37cef2956f40..cc198490ac3b 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -230,7 +230,7 @@ struct kernel_module struct preloaded_file { char *f_name; /* file name */ - char *f_type; /* verbose file type, eg 'ELF kernel', 'pnptable', etc. */ + char *f_type; /* verbose file type, eg 'elf kernel', 'pnptable', etc. */ char *f_args; /* arguments for the file */ /* metadata that will be placed in the module directory */ struct file_metadata *f_metadata; diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 9942c629d124..9bda0e7139a9 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -2984,8 +2984,6 @@ build_font_module(vm_offset_t addr) fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) - fp = file_findfile(NULL, "elf64 kernel"); - if (fp == NULL) panic("can't find kernel file"); fontp = addr; @@ -3028,8 +3026,6 @@ build_splash_module(vm_offset_t addr) fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) - fp = file_findfile(NULL, "elf64 kernel"); - if (fp == NULL) panic("can't find kernel file"); splash = getenv("splash"); diff --git a/stand/common/metadata.c b/stand/common/metadata.c index f95763bfd01b..8962763061dc 100644 --- a/stand/common/metadata.c +++ b/stand/common/metadata.c @@ -146,9 +146,7 @@ md_load_dual(char *args, vm_offset_t *modulep, vm_offset_t *dtb, int kern64) #endif kernend = 0; - kfp = file_findfile(NULL, kern64 ? "elf64 kernel" : "elf32 kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf kernel"); + kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) panic("can't find kernel file"); file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); |