Date: Sun, 28 Apr 2019 13:28:05 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346821 - in stable/11/sys: amd64/linux amd64/linux32 i386/linux kern sys Message-ID: <201904281328.x3SDS5UJ017615@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sun Apr 28 13:28:05 2019 New Revision: 346821 URL: https://svnweb.freebsd.org/changeset/base/346821 Log: MFC r330866 (by emaste@): Use C99 boolean type for translate_osrel Migrate to modern types before creating MD Linuxolator bits for new architectures. Modified: stable/11/sys/amd64/linux/linux_sysvec.c stable/11/sys/amd64/linux32/linux32_sysvec.c stable/11/sys/i386/linux/linux_sysvec.c stable/11/sys/kern/imgact_elf.c stable/11/sys/sys/imgact_elf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/amd64/linux/linux_sysvec.c Sun Apr 28 13:26:55 2019 (r346820) +++ stable/11/sys/amd64/linux/linux_sysvec.c Sun Apr 28 13:28:05 2019 (r346821) @@ -121,7 +121,7 @@ SET_DECLARE(linux_ioctl_handler_set, struct linux_ioct static register_t * linux_copyout_strings(struct image_params *imgp); static int elf_linux_fixup(register_t **stack_base, struct image_params *iparams); -static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); static void linux_set_syscall_retval(struct thread *td, int error); @@ -845,7 +845,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNULINUX_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -856,7 +856,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -864,7 +864,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux64_brandnote = { Modified: stable/11/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_sysvec.c Sun Apr 28 13:26:55 2019 (r346820) +++ stable/11/sys/amd64/linux32/linux32_sysvec.c Sun Apr 28 13:28:05 2019 (r346821) @@ -127,7 +127,7 @@ static void linux_sendsig(sig_t catcher, ksiginfo_ static void exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack); static void linux32_fixlimit(struct rlimit *rl, int which); -static boolean_t linux32_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux32_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); @@ -1043,7 +1043,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNU_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux32_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -1054,7 +1054,7 @@ linux32_trans_osrel(const Elf_Note *note, int32_t *osr desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -1062,7 +1062,7 @@ linux32_trans_osrel(const Elf_Note *note, int32_t *osr */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux32_brandnote = { Modified: stable/11/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/i386/linux/linux_sysvec.c Sun Apr 28 13:26:55 2019 (r346820) +++ stable/11/sys/i386/linux/linux_sysvec.c Sun Apr 28 13:28:05 2019 (r346821) @@ -115,7 +115,7 @@ static void linux_sendsig(sig_t catcher, ksiginfo_ static void exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack); static register_t *linux_copyout_strings(struct image_params *imgp); -static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); @@ -1009,7 +1009,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNU_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -1020,7 +1020,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -1028,7 +1028,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux_brandnote = { Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Sun Apr 28 13:26:55 2019 (r346820) +++ stable/11/sys/kern/imgact_elf.c Sun Apr 28 13:28:05 2019 (r346821) @@ -95,9 +95,9 @@ static int __elfN(load_section)(struct image_params *i caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot, size_t pagesize); static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); -static boolean_t __elfN(freebsd_trans_osrel)(const Elf_Note *note, +static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); -static boolean_t kfreebsd_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); static vm_prot_t __elfN(trans_prot)(Elf_Word); @@ -154,7 +154,7 @@ Elf_Brandnote __elfN(freebsd_brandnote) = { .trans_osrel = __elfN(freebsd_trans_osrel) }; -static boolean_t +static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel) { uintptr_t p; @@ -163,7 +163,7 @@ __elfN(freebsd_trans_osrel)(const Elf_Note *note, int3 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); *osrel = *(const int32_t *)(p); - return (TRUE); + return (true); } static const char GNU_ABI_VENDOR[] = "GNU"; @@ -178,7 +178,7 @@ Elf_Brandnote __elfN(kfreebsd_brandnote) = { .trans_osrel = kfreebsd_trans_osrel }; -static boolean_t +static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -189,7 +189,7 @@ kfreebsd_trans_osrel(const Elf_Note *note, int32_t *os desc = (const Elf32_Word *)p; if (desc[0] != GNU_KFREEBSD_ABI_DESC) - return (FALSE); + return (false); /* * Debian GNU/kFreeBSD embed the earliest compatible kernel version @@ -197,7 +197,7 @@ kfreebsd_trans_osrel(const Elf_Note *note, int32_t *os */ *osrel = desc[1] * 100000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } int Modified: stable/11/sys/sys/imgact_elf.h ============================================================================== --- stable/11/sys/sys/imgact_elf.h Sun Apr 28 13:26:55 2019 (r346820) +++ stable/11/sys/sys/imgact_elf.h Sun Apr 28 13:28:05 2019 (r346821) @@ -61,7 +61,7 @@ typedef struct { Elf_Note hdr; const char * vendor; int flags; - boolean_t (*trans_osrel)(const Elf_Note *, int32_t *); + bool (*trans_osrel)(const Elf_Note *, int32_t *); #define BN_CAN_FETCH_OSREL 0x0001 /* Deprecated. */ #define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel to fetch osrel */ /* after checking the image ABI specification, if needed. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904281328.x3SDS5UJ017615>