git: 407f675718aa - main - imgact_elf: Change header_supported to return bool instead of boolean_t.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 May 2023 19:34:18 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=407f675718aaf3dfed4795746b41c946ced47209 commit 407f675718aaf3dfed4795746b41c946ced47209 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-05-04 19:29:29 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-05-04 19:29:29 +0000 imgact_elf: Change header_supported to return bool instead of boolean_t. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D39919 --- sys/amd64/amd64/elf_machdep.c | 10 +++++----- sys/arm/arm/elf_machdep.c | 8 ++++---- sys/arm64/arm64/elf32_machdep.c | 10 +++++----- sys/powerpc/powerpc/elf64_machdep.c | 8 ++++---- sys/sys/imgact_elf.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 3dc606edc04d..afb30a1751b2 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -167,17 +167,17 @@ amd64_lower_shared_page(struct sysentvec *sv) } } -static boolean_t +static bool freebsd_brand_info_la57_img_compat(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0) { if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) - return (TRUE); + return (true); if (fctl0 == NULL || (*fctl0 & NT_FREEBSD_FCTL_LA48) != 0) - return (FALSE); + return (false); if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0) - return (FALSE); - return (TRUE); + return (false); + return (true); } static Elf64_Brandinfo freebsd_brand_info_la48 = { diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 724b3437458e..3580d399ff56 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ #include "opt_stack.h" /* for OPT_STACK */ -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); u_long elf_hwcap; @@ -125,7 +125,7 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -138,9 +138,9 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, if (bootverbose) uprintf("Attempting to execute non EABI binary (rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } void diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7b346ed81b2c..e57ae0e35fa1 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -74,7 +74,7 @@ static void freebsd32_setregs(struct thread *td, struct image_params *imgp, u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -142,7 +142,7 @@ static Elf32_Brandinfo freebsd32_brand_info = { SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -151,7 +151,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, /* Check if we support AArch32 */ if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) != ID_AA64PFR0_EL0_64_32) - return (FALSE); + return (false); #define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 hdr = (const Elf32_Ehdr *)imgp->image_header; @@ -161,10 +161,10 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, "(rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } static int diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index a247a2c51ad6..3d39ba40b898 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -149,9 +149,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_regset_end = SET_LIMIT(__elfN(regset)), }; -static boolean_t ppc64_elfv1_header_match(struct image_params *params, +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *, uint32_t *); -static boolean_t ppc64_elfv2_header_match(struct image_params *params, +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *, uint32_t *); static Elf64_Brandinfo freebsd_brand_info_elfv1 = { @@ -227,7 +227,7 @@ ppc64_init_sysvecs(void *arg) } SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); -static boolean_t +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -237,7 +237,7 @@ ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, return (abi == 0 || abi == 1); } -static boolean_t +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 6890df5c1500..21f52ccb6c05 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -89,7 +89,7 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; - boolean_t (*header_supported)(struct image_params *, + bool (*header_supported)(struct image_params *, int32_t *, uint32_t *); /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001