From nobody Fri Jan 24 21:37:13 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YfrkL0shsz5lS43; Fri, 24 Jan 2025 21:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfrkK74SBz3jf5; Fri, 24 Jan 2025 21:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737754634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5USh3nZiDAFTp05j/bWR7T1dRTC7JcySIBer1EVuv+k=; b=dkRFVqIi4emtx/LzXa54Bc4bS1BBAsB/BUw0IztHHJSTBZxq3SDfVEQLUCovmY0jwIWyfa W82l36OMYz7lpZfeD4Qm7DBdiQ93Jn9ezvgyef1MoHYIqwfLJ+42Iew2b8+5EN+9INj3u4 RMdjLJwK832RLQTAu14zkpppWgr5YiJmXk5z6YEZJyvy11Ne6WdGrLK0JEAfk3ZmG1dKQY Pn0bqe5LbC7PwBZJDGXqFRYHlx7s0sdBDUh64M4DFU89q9aQSOJSN6FFCdqMyUpXvYBKQl Zwc3TT6pnpJPmAQcOSXxtlkhpgc3h872xVGECuDmYMb8TnJOKBRkHUAByyMDuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737754634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5USh3nZiDAFTp05j/bWR7T1dRTC7JcySIBer1EVuv+k=; b=Ktr8qQyBRme+zMnZfYOqAtGmD44LRJIKAv+/nE9m0N3R8MIdFgloecNs1g9qU/Dhwr57WM MAOm6lNs9RJDMpUy9jgDds9WwD6FUY0FQuHRgSMd4be36mBWT/nff5jza1VyzZvx/RWqT+ R4VJzKt77OUhH/xIQexH09JfBfKS1I5NkJ9wGY+bYuUh6r20eg/px7rQIBr3MD5yoIQt1f pJbrZiVOgrvVgyDbsxShuAjEeD950ntpbZBn5Vz9sm3mDLUYJJ6CsZQMYbdUmTrqB7OfMk i41ZP3GZ80I/F2hMHkKxE4BRstZzFbubYXtYt1Az18cLr+5ey1T2vdRobluRXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737754634; a=rsa-sha256; cv=none; b=cbmsPkI1vND1qnMRNnkzc9VSQVHBQTJAm1zKtrkDm7fk8l6EEmFSpJ7Vq4WqDT+6ubwUFi da4AJk0HZf0yJN/tPWJWw4Y31+HXn/Xk7sIJdYDOx5nOF2lRZ+BVAaf3lrF56YyoHiD6Ce 3ARXn99pC1J6/K/sfXW/uxSMZCfe/TErL36wHHrAs4ZpH6+iZ76AnFUkFnTwX34O0aPtxa RNq90WLgXEuGDEEdKQYNbLDf4XwvjpQYCLs7Jzd4HZbe6Zzz9yAby6FkrCDERQjoYNR+W9 rjeW8mTIucxR7QW2LzPXu1xrGKIMW1TnfwJ3v+6GkKFt2s+nwMTqe0fzoTbGKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YfrkK6fHYzjwk; Fri, 24 Jan 2025 21:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50OLbDro094812; Fri, 24 Jan 2025 21:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50OLbDn2094809; Fri, 24 Jan 2025 21:37:13 GMT (envelope-from git) Date: Fri, 24 Jan 2025 21:37:13 GMT Message-Id: <202501242137.50OLbDn2094809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 707136024fcc - main - stand: remove unnecessary checks for "elfN kernel" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 707136024fcc64be5008c793cdbdd05720be0e18 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=707136024fcc64be5008c793cdbdd05720be0e18 commit 707136024fcc64be5008c793cdbdd05720be0e18 Author: Ahmad Khalifa AuthorDate: 2024-08-22 19:07:59 +0000 Commit: Warner Losh CommitDate: 2025-01-24 21:25:52 +0000 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 --- stand/common/bootstrap.h | 2 +- stand/common/gfx_fb.c | 4 ---- stand/common/metadata.c | 4 +--- stand/efi/loader/bootinfo.c | 2 -- stand/i386/libi386/bootinfo32.c | 2 -- stand/i386/libi386/bootinfo64.c | 2 -- stand/userboot/userboot/bootinfo32.c | 2 -- stand/userboot/userboot/bootinfo64.c | 2 -- 8 files changed, 2 insertions(+), 18 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 @@ -2983,8 +2983,6 @@ build_font_module(vm_offset_t addr) fi.fi_checksum = -checksum; fp = file_findfile(NULL, "elf kernel"); - if (fp == NULL) - fp = file_findfile(NULL, "elf64 kernel"); if (fp == NULL) panic("can't find kernel file"); @@ -3027,8 +3025,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"); 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); diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 99a7b1444aca..b7d4070c2ffb 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -421,8 +421,6 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf64 kernel"); if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */ diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c index 535849011b6b..df715e547795 100644 --- a/stand/i386/libi386/bootinfo32.c +++ b/stand/i386/libi386/bootinfo32.c @@ -130,8 +130,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t addr = roundup(addr, PAGE_SIZE); kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf32 kernel"); if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */ diff --git a/stand/i386/libi386/bootinfo64.c b/stand/i386/libi386/bootinfo64.c index a55b86eb5ba7..4731b10325fe 100644 --- a/stand/i386/libi386/bootinfo64.c +++ b/stand/i386/libi386/bootinfo64.c @@ -144,8 +144,6 @@ bi_load64(char *args, vm_offset_t *modulep, module = *modulep = addr; kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf64 kernel"); if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */ diff --git a/stand/userboot/userboot/bootinfo32.c b/stand/userboot/userboot/bootinfo32.c index aae94e6a2370..91f1f81f1181 100644 --- a/stand/userboot/userboot/bootinfo32.c +++ b/stand/userboot/userboot/bootinfo32.c @@ -109,8 +109,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t addr = roundup(addr, PAGE_SIZE); kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf32 kernel"); if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */ diff --git a/stand/userboot/userboot/bootinfo64.c b/stand/userboot/userboot/bootinfo64.c index b7c07e152b8a..fb9fd0fb82f1 100644 --- a/stand/userboot/userboot/bootinfo64.c +++ b/stand/userboot/userboot/bootinfo64.c @@ -141,8 +141,6 @@ bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) addr = roundup(addr, PAGE_SIZE); kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf64 kernel"); if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */