From nobody Thu Nov 18 00:04:32 2021 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 DE1E6188AF26; Thu, 18 Nov 2021 00:04:33 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hvg5Y0dkvz3qQ7; Thu, 18 Nov 2021 00:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 568AD286B; Thu, 18 Nov 2021 00:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AI04WxL054681; Thu, 18 Nov 2021 00:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04WLP054680; Thu, 18 Nov 2021 00:04:32 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:32 GMT Message-Id: <202111180004.1AI04WLP054680@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1962164584a9 - main - imgact_elf: Use bool instead of boolean_t. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1962164584a91078418afcd7c979afef13df8c4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1962164584a91078418afcd7c979afef13df8c4d commit 1962164584a91078418afcd7c979afef13df8c4d Author: Alex Richardson AuthorDate: 2021-11-17 23:51:29 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:51:29 +0000 imgact_elf: Use bool instead of boolean_t. Reviewed by: kib Obtained from: CheriBSD Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33051 --- sys/kern/imgact_elf.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 38ad61d8720b..0751c25bd47d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -97,8 +97,8 @@ static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); 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 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, { 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 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) } } -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 @@ nextnote: roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } retf: - res = FALSE; + res = false; ret: free(buf, M_TEMP); return (res); @@ -2568,8 +2568,8 @@ struct brandnote_cb_arg { 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 @@ brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res) */ *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 @@ static Elf_Note fctl_note = { }; 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 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) 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 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) * 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 @@ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, note_fctl_cb, &f_arg)) break; } - return (TRUE); + return (true); } } - return (FALSE); + return (false); }