diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -97,8 +97,8 @@ static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); -static boolean_t __elfN(check_note)(struct image_params *imgp, - Elf_Brandnote *checknote, int32_t *osrel, boolean_t *has_fctl0, +static bool __elfN(check_note)(struct image_params *imgp, + Elf_Brandnote *checknote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0); static vm_prot_t __elfN(trans_prot)(Elf_Word); static Elf_Word __elfN(untrans_prot)(vm_prot_t); @@ -326,7 +326,7 @@ { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Elf_Brandinfo *bi, *bi_m; - boolean_t ret, has_fctl0; + bool ret, has_fctl0; int i, interp_name_len; interp_name_len = interp != NULL ? strlen(interp) + 1 : 0; @@ -2495,20 +2495,20 @@ } } -static boolean_t +static bool __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, const char *note_vendor, const Elf_Phdr *pnote, - boolean_t (*cb)(const Elf_Note *, void *, boolean_t *), void *cb_arg) + bool (*cb)(const Elf_Note *, void *, bool *), void *cb_arg) { const Elf_Note *note, *note0, *note_end; const char *note_name; char *buf; int i, error; - boolean_t res; + bool res; /* We need some limit, might as well use PAGE_SIZE. */ if (pnote == NULL || pnote->p_filesz > PAGE_SIZE) - return (FALSE); + return (false); ASSERT_VOP_LOCKED(imgp->vp, "parse_notes"); if (pnote->p_offset > PAGE_SIZE || pnote->p_filesz > PAGE_SIZE - pnote->p_offset) { @@ -2557,7 +2557,7 @@ roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } retf: - res = FALSE; + res = false; ret: free(buf, M_TEMP); return (res); @@ -2568,8 +2568,8 @@ int32_t *osrel; }; -static boolean_t -brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res) +static bool +brandnote_cb(const Elf_Note *note, void *arg0, bool *res) { struct brandnote_cb_arg *arg; @@ -2581,9 +2581,9 @@ */ *res = (arg->brandnote->flags & BN_TRANSLATE_OSREL) != 0 && arg->brandnote->trans_osrel != NULL ? - arg->brandnote->trans_osrel(note, arg->osrel) : TRUE; + arg->brandnote->trans_osrel(note, arg->osrel) : true; - return (TRUE); + return (true); } static Elf_Note fctl_note = { @@ -2593,12 +2593,12 @@ }; struct fctl_cb_arg { - boolean_t *has_fctl0; + bool *has_fctl0; uint32_t *fctl0; }; -static boolean_t -note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) +static bool +note_fctl_cb(const Elf_Note *note, void *arg0, bool *res) { struct fctl_cb_arg *arg; const Elf32_Word *desc; @@ -2608,10 +2608,10 @@ p = (uintptr_t)(note + 1); p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); desc = (const Elf32_Word *)p; - *arg->has_fctl0 = TRUE; + *arg->has_fctl0 = true; *arg->fctl0 = desc[0]; - *res = TRUE; - return (TRUE); + *res = true; + return (true); } /* @@ -2620,9 +2620,9 @@ * OSABI-note. Only the first page of the image is searched, the same * as for headers. */ -static boolean_t +static bool __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, - int32_t *osrel, boolean_t *has_fctl0, uint32_t *fctl0) + int32_t *osrel, bool *has_fctl0, uint32_t *fctl0) { const Elf_Phdr *phdr; const Elf_Ehdr *hdr; @@ -2648,10 +2648,10 @@ note_fctl_cb, &f_arg)) break; } - return (TRUE); + return (true); } } - return (FALSE); + return (false); }