svn commit: r330236 - head/sys/compat/linuxkpi/common/src
Author: hselasky Date: Thu Mar 1 10:31:51 2018 New Revision: 330236 URL: https://svnweb.freebsd.org/changeset/base/330236 Log: Correct the return value from flush_work() and flush_delayed_work() in the LinuxKPI to comply more with Linux. This fixes an issue when these functions are used in waiting loops. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/src/linux_work.c == --- head/sys/compat/linuxkpi/common/src/linux_work.cThu Mar 1 08:33:20 2018(r330235) +++ head/sys/compat/linuxkpi/common/src/linux_work.cThu Mar 1 10:31:51 2018(r330236) @@ -454,6 +454,7 @@ bool linux_flush_work(struct work_struct *work) { struct taskqueue *tq; + int retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_work() might sleep"); @@ -463,8 +464,9 @@ linux_flush_work(struct work_struct *work) return (0); default: tq = work->work_queue->taskqueue; + retval = taskqueue_poll_is_busy(tq, &work->work_task); taskqueue_drain(tq, &work->work_task); - return (1); + return (retval); } } @@ -477,6 +479,7 @@ bool linux_flush_delayed_work(struct delayed_work *dwork) { struct taskqueue *tq; + int retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_delayed_work() might sleep"); @@ -490,8 +493,9 @@ linux_flush_delayed_work(struct delayed_work *dwork) /* FALLTHROUGH */ default: tq = dwork->work.work_queue->taskqueue; + retval = taskqueue_poll_is_busy(tq, &dwork->work.work_task); taskqueue_drain(tq, &dwork->work.work_task); - return (1); + return (retval); } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330239 - in head/sys: amd64/linux compat/linux
Author: emaste Date: Thu Mar 1 13:52:18 2018 New Revision: 330239 URL: https://svnweb.freebsd.org/changeset/base/330239 Log: Rationalize license text on Linuxolator files Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the standard 2-clause FreeBSD license for those files where I have permission from each of the listed copyright holders. Additional files still waiting on permission from others are listed in review D14210. Approved by:dchagin, rdivacky, sos MFC after:1 week MFC with: r329370 Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux.h head/sys/amd64/linux/linux_dummy.c head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_emul.h Modified: head/sys/amd64/linux/linux.h == --- head/sys/amd64/linux/linux.hThu Mar 1 10:57:50 2018 (r330238) +++ head/sys/amd64/linux/linux.hThu Mar 1 13:52:18 2018 (r330239) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Dmitry Chagin * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. @@ -7,24 +9,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer - *in this position and unchanged. + *notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * $FreeBSD$ */ Modified: head/sys/amd64/linux/linux_dummy.c == --- head/sys/amd64/linux/linux_dummy.c Thu Mar 1 10:57:50 2018 (r330238) +++ head/sys/amd64/linux/linux_dummy.c Thu Mar 1 13:52:18 2018 (r330239) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Dmitry Chagin * All rights reserved. * @@ -6,22 +8,22 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer - *in this position and unchanged. + *notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS O
svn commit: r330240 - in head/sys: conf powerpc/conf powerpc/powernv
Author: wma Date: Thu Mar 1 14:11:07 2018 New Revision: 330240 URL: https://svnweb.freebsd.org/changeset/base/330240 Log: PowerNV: Initial support for OPAL I2C transfers Add I2C OPAL driver and a set of dummy-ones to allow all I2C things on Power8 to attach. TODO: better async token management Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Added: head/sys/powerpc/powernv/opal_i2c.c (contents, props changed) head/sys/powerpc/powernv/opal_i2cm.c (contents, props changed) head/sys/powerpc/powernv/powernv_centaur.c (contents, props changed) head/sys/powerpc/powernv/powernv_xscom.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/powernv/opal.h Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Thu Mar 1 13:52:18 2018(r330239) +++ head/sys/conf/files.powerpc Thu Mar 1 14:11:07 2018(r330240) @@ -186,9 +186,13 @@ powerpc/powermac/vcoregpio.c optional powermac powerpc/powernv/opal.c optionalpowernv powerpc/powernv/opal_console.c optionalpowernv powerpc/powernv/opal_dev.c optionalpowernv +powerpc/powernv/opal_i2c.c optionaliicbus fdt powernv +powerpc/powernv/opal_i2cm.coptionaliicbus fdt powernv powerpc/powernv/opal_pci.c optionalpowernv pci powerpc/powernv/opalcall.S optionalpowernv powerpc/powernv/platform_powernv.c optionalpowernv +powerpc/powernv/powernv_centaur.c optionalpowernv +powerpc/powernv/powernv_xscom.coptionalpowernv powerpc/powerpc/altivec.c optionalpowerpc | powerpc64 powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.cstandard Modified: head/sys/powerpc/conf/GENERIC64 == --- head/sys/powerpc/conf/GENERIC64 Thu Mar 1 13:52:18 2018 (r330239) +++ head/sys/powerpc/conf/GENERIC64 Thu Mar 1 14:11:07 2018 (r330240) @@ -206,6 +206,7 @@ device fwe # Ethernet over FireWire (non-standard!) # Misc device iicbus # I2C bus code +device iic device kiic# Keywest I2C device ad7417 # PowerMac7,2 temperature sensor device ds1631 # PowerMac11,2 temperature sensor Modified: head/sys/powerpc/powernv/opal.h == --- head/sys/powerpc/powernv/opal.h Thu Mar 1 13:52:18 2018 (r330239) +++ head/sys/powerpc/powernv/opal.h Thu Mar 1 14:11:07 2018 (r330240) @@ -71,15 +71,37 @@ int opal_call(uint64_t token, ...); #defineOPAL_PCI_MAP_PE_DMA_WINDOW_REAL 45 #defineOPAL_RETURN_CPU 69 #defineOPAL_REINIT_CPUS70 +#defineOPAL_CHECK_ASYNC_COMPLETION 86 +#defineOPAL_I2C_REQUEST109 #defineOPAL_PCI_TCE_KILL 126 /* For OPAL_PCI_SET_PE */ #defineOPAL_UNMAP_PE 0 #define OPAL_MAP_PE1 -#define OPAL_SUCCESS 0 -#define OPAL_PARAMETER -1 -#define OPAL_CLOSED-5 +#defineOPAL_SUCCESS0 +#defineOPAL_PARAMETER -1 +#defineOPAL_BUSY -2 +#defineOPAL_CLOSED -5 #defineOPAL_BUSY_EVENT -12 +#defineOPAL_ASYNC_COMPLETION -15 + +struct opal_msg { + uint32_t msg_type; + uint32_t reserved; + uint64_t params[8]; +}; + +enum opal_msg_type { + OPAL_MSG_ASYNC_COMP = 0, + OPAL_MSG_MEM_ERR= 1, + OPAL_MSG_EPOW = 2, + OPAL_MSG_SHUTDOWN = 3, + OPAL_MSG_HMI_EVT= 4, + OPAL_MSG_DPO= 5, + OPAL_MSG_PRD= 6, + OPAL_MSG_OCC= 7, + OPAL_MSG_TYPE_MAX, +}; #endif Added: head/sys/powerpc/powernv/opal_i2c.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_i2c.c Thu Mar 1 14:11:07 2018 (r330240) @@ -0,0 +1,252 @@ +/*- + * Copyright (c) 2017-2018 QCM Technologies. + * Copyright (c) 2017-2018 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form
Re: svn commit: r324099 - in head: share/mk sys/boot
Thanks, I'll handle this. Regards, Wojtek 2018-02-28 16:01 GMT+01:00 Ed Maste : > On 29 September 2017 at 02:36, Wojciech Macek wrote: > > Author: wma > > Date: Fri Sep 29 06:36:19 2017 > > New Revision: 324099 > > URL: https://svnweb.freebsd.org/changeset/base/324099 > > > > Log: > > Compile loader as Little-Endian on PPC64/POWER8 > > This is missing a description file in tools/build/options; generating > src.conf.5 reports "no description found for WITH_LOADER_FORCE_LE" (as > well as 5 other missing descriptions and a number of duplicate options > in mips and riscv). > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r330240 - in head/sys: conf powerpc/conf powerpc/powernv
On 03/01/18 06:11, Wojciech Macek wrote: Author: wma Date: Thu Mar 1 14:11:07 2018 New Revision: 330240 URL: https://svnweb.freebsd.org/changeset/base/330240 Log: PowerNV: Initial support for OPAL I2C transfers Add I2C OPAL driver and a set of dummy-ones to allow all I2C things on Power8 to attach. TODO: better async token management Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Added: head/sys/powerpc/powernv/opal_i2c.c (contents, props changed) head/sys/powerpc/powernv/opal_i2cm.c (contents, props changed) head/sys/powerpc/powernv/powernv_centaur.c (contents, props changed) head/sys/powerpc/powernv/powernv_xscom.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/powernv/opal.h Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Thu Mar 1 13:52:18 2018(r330239) +++ head/sys/conf/files.powerpc Thu Mar 1 14:11:07 2018(r330240) @@ -186,9 +186,13 @@ powerpc/powermac/vcoregpio.c optionalpowermac powerpc/powernv/opal.coptionalpowernv powerpc/powernv/opal_console.coptionalpowernv powerpc/powernv/opal_dev.coptionalpowernv +powerpc/powernv/opal_i2c.c optionaliicbus fdt powernv +powerpc/powernv/opal_i2cm.coptionaliicbus fdt powernv These don't use FDT functions directly (and shouldn't), so you should remove the fdt part on the right. We only gate on 'options FDT' for things that are really FDT- (as opposed to OF-) specific. powerpc/powernv/opal_pci.coptionalpowernv pci powerpc/powernv/opalcall.Soptionalpowernv powerpc/powernv/platform_powernv.c optional powernv +powerpc/powernv/powernv_centaur.c optionalpowernv +powerpc/powernv/powernv_xscom.coptionalpowernv powerpc/powerpc/altivec.c optionalpowerpc | powerpc64 powerpc/powerpc/autoconf.cstandard powerpc/powerpc/bcopy.c standard Modified: head/sys/powerpc/conf/GENERIC64 == --- head/sys/powerpc/conf/GENERIC64 Thu Mar 1 13:52:18 2018 (r330239) +++ head/sys/powerpc/conf/GENERIC64 Thu Mar 1 14:11:07 2018 (r330240) @@ -206,6 +206,7 @@ device fwe # Ethernet over FireWire (non-standard!) # Misc deviceiicbus # I2C bus code +device iic Please add a comment here. -Nathan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330245 - in head/usr.sbin/pw: . tests
Author: dab Date: Thu Mar 1 17:47:28 2018 New Revision: 330245 URL: https://svnweb.freebsd.org/changeset/base/330245 Log: Allow the "@" and "!" characters in passwd file GECOS fields. Two PRs (152084 & 210187) request allowing the "@" and/or "!" characters in the passwd file GECOS field. The man page for pw does not mention that those characters are disallowed, Linux supports those characters in this field, and the "@" character in particular would be useful for storing email addresses in that field. PR: 152084, 210187 Submitted by: jscha...@netmeister.org, Dave Cottlehuber Reported by: jscha...@netmeister.org, Dave Cottlehuber Reviewed by: delphij (secteam), vangyzen MFC after:1 week Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D14519 Modified: head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/tests/pw_useradd_test.sh Modified: head/usr.sbin/pw/pw_user.c == --- head/usr.sbin/pw/pw_user.c Thu Mar 1 17:31:36 2018(r330244) +++ head/usr.sbin/pw/pw_user.c Thu Mar 1 17:47:28 2018(r330245) @@ -632,7 +632,7 @@ pw_checkname(char *name, int gecos) reject = 0; if (gecos) { /* See if the name is valid as a gecos (comment) field. */ - badchars = ":!@"; + badchars = ":"; showtype = "gecos field"; } else { /* See if the name is valid as a userid or group. */ Modified: head/usr.sbin/pw/tests/pw_useradd_test.sh == --- head/usr.sbin/pw/tests/pw_useradd_test.sh Thu Mar 1 17:31:36 2018 (r330244) +++ head/usr.sbin/pw/tests/pw_useradd_test.sh Thu Mar 1 17:47:28 2018 (r330245) @@ -27,9 +27,9 @@ atf_test_case user_add_comments user_add_comments_body() { populate_etc_skel - atf_check -s exit:0 ${PW} useradd test -c "Test User,work,123,456" - atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ - grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd + atf_check -s exit:0 ${PW} useradd test -c 'Test User,work!,123,u...@example.com' + atf_check -s exit:0 -o match:'^test:.*:Test User,work!,123,u...@example.com:' \ + grep '^test:.*:Test User,work!,123,u...@example.com:' $HOME/master.passwd } # Test add user with comments and option -N ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330248 - in head: share/mk stand
Author: imp Date: Thu Mar 1 19:50:55 2018 New Revision: 330248 URL: https://svnweb.freebsd.org/changeset/base/330248 Log: Create LOADER_UBOOT, and LOADER_OFW. Move these options out of Makefile.${MACHINE_ARCH} and remove the now-empty files. Generate the *32 directories on the necessary architectures (well, currently only amd64) on the fly. Remove LOADER_EFI variable and co-locate it with EFI. Differential Review: https://reviews.freebsd.org/D14546 Deleted: head/stand/Makefile.arm head/stand/Makefile.arm64 head/stand/Makefile.i386 head/stand/Makefile.mips head/stand/Makefile.powerpc head/stand/Makefile.sparc64 Modified: head/share/mk/src.opts.mk head/stand/Makefile head/stand/Makefile.amd64 Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Thu Mar 1 18:19:14 2018(r330247) +++ head/share/mk/src.opts.mk Thu Mar 1 19:50:55 2018(r330248) @@ -134,8 +134,9 @@ __DEFAULT_YES_OPTIONS = \ LPR \ LS_COLORS \ LZMA_SUPPORT \ -LOADER_EFI \ LOADER_GELI \ +LOADER_OFW \ +LOADER_UBOOT \ MAIL \ MAILWRAPPER \ MAKE \ @@ -297,8 +298,21 @@ BROKEN_OPTIONS+=SSP .endif # EFI doesn't exist on mips, powerpc, sparc or riscv. .if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} -BROKEN_OPTIONS+=EFI LOADER_EFI +BROKEN_OPTIONS+=EFI .endif +# GELI isn't supported on !x86 +.if ${__T} != "i386" && ${__T} != "amd64" +BROKEN_OPTIONS+=LOADER_GELI +.endif +# OFW is only for powerpc and sparc64, exclude others +.if ${__T:Mpowerpc*} == "" && ${__T:Msparc64} == "" +BROKEN_OPTIONS+=LOADER_OFW +.endif +# UBOOT is only for arm, mips and powerpc, exclude others +.if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == "" +BROKEN_OPTIONS+=LOADER_UBOOT +.endif + .if ${__T:Mmips64*} # profiling won't work on MIPS64 because there is only assembly for o32 BROKEN_OPTIONS+=PROFILE Modified: head/stand/Makefile == --- head/stand/Makefile Thu Mar 1 18:19:14 2018(r330247) +++ head/stand/Makefile Thu Mar 1 19:50:55 2018(r330248) @@ -2,28 +2,43 @@ .include -SUBDIR+= libsa -.if ${MK_FORTH} != "no" -# Build the add-in FORTH interpreter. -SUBDIR+= ficl -SUBDIR+= forth +# For amd64 we have to build 32 and 64 bit versions of things. For +# others we don't. LIB32LIST is a list of libraries, which if +# included, need to be built 32-bit as well. +.if ${MACHINE_ARCH} == "amd64" +LIB32LIST=libsa ficl liblua zfs .endif -.if ${MK_LOADER_LUA} != "no" -SUBDIR+= liblua -SUBDIR+= lua -.endif -SUBDIR+= defaults -SUBDIR+= man +S.yes+=libsa +S.${MK_FORTH}+=ficl +S.${MK_FORTH}+=forth +S.${MK_LOADER_LUA}+= liblua +S.${MK_LOADER_LUA}+= lua +S.${MK_FDT}+= fdt +S.${MK_LOADER_OFW}+= ofw +S.${MK_ZFS}+= zfs +S.yes+=defaults +S.yes+=man + +S.${MK_LOADER_GELI}+= geli + .include -.if ${MK_EFI} != "no" && ${MK_LOADER_EFI} != "no" -SUBDIR+= efi -.endif +S.${MK_EFI}+= efi +S.${MK_LOADER_UBOOT}+= uboot .if exists(${.CURDIR}/${MACHINE}/.) -SUBDIR+= ${MACHINE} +S.yes+= ${MACHINE} .endif + +# Build the actual subdir list from S.yes, adding in the 32-bit +# variant if necessary. +.for _x in ${S.yes} +SUBDIR+=${_x} +.if defined(LIB32LIST) && ${LIB32LIST:M${_x}} +SUBDIR+=${_x}32 +.endif +.endfor .include Modified: head/stand/Makefile.amd64 == --- head/stand/Makefile.amd64 Thu Mar 1 18:19:14 2018(r330247) +++ head/stand/Makefile.amd64 Thu Mar 1 19:50:55 2018(r330248) @@ -1,20 +1,4 @@ # $FreeBSD$ -SUBDIR+= libsa32 -.if ${MK_ZFS} != "no" -SUBDIR+= zfs zfs32 -.endif -.if ${MK_FORTH} != "no" -SUBDIR+= ficl32 -.endif -.if ${MK_LOADER_LUA} != "no" -SUBDIR+= liblua32 -.endif - -SUBDIR+= userboot - -.if ${MK_LOADER_GELI} == "yes" -SUBDIR+= geli -.endif - -SUBDIR+= i386 +S.yes+=userboot +S.yes+=i386 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330249 - in head/stand: efi i386 powerpc sparc64 uboot
Author: kevans Date: Thu Mar 1 19:59:49 2018 New Revision: 330249 URL: https://svnweb.freebsd.org/changeset/base/330249 Log: stand: Makefile SUBDIR cleanup Use SUBDIR.${MK_*} where appropriate. r330248 eliminated most of the offenders, sweep the rest under the rug. Differential Revision:https://reviews.freebsd.org/D14545 Modified: head/stand/efi/Makefile head/stand/i386/Makefile head/stand/powerpc/Makefile head/stand/sparc64/Makefile head/stand/uboot/Makefile Modified: head/stand/efi/Makefile == --- head/stand/efi/Makefile Thu Mar 1 19:50:55 2018(r330248) +++ head/stand/efi/Makefile Thu Mar 1 19:59:49 2018(r330249) @@ -8,10 +8,7 @@ NO_OBJ=t # than 4.5 supports it. .if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 -.if ${MK_FDT} != "no" -SUBDIR+= fdt -.endif - +SUBDIR.${MK_FDT}+= fdt SUBDIR+= libefi loader boot1 .endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 Modified: head/stand/i386/Makefile == --- head/stand/i386/MakefileThu Mar 1 19:50:55 2018(r330248) +++ head/stand/i386/MakefileThu Mar 1 19:59:49 2018(r330249) @@ -7,9 +7,7 @@ NO_OBJ=t SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ libi386 -.if ${MK_LOADER_FIREWIRE} == "yes" -SUBDIR+= libfirewire -.endif +SUBDIR.${MK_LOADER_FIREWIRE}+= libfirewire SUBDIR+= loader @@ -20,8 +18,6 @@ SUBDIR+= pxeldr SUBDIR+= kgzldr .endif -.if ${MK_ZFS} != "no" -SUBDIR+= zfsboot gptzfsboot zfsloader -.endif +SUBDIR.${MK_ZFS}+= zfsboot gptzfsboot zfsloader .include Modified: head/stand/powerpc/Makefile == --- head/stand/powerpc/Makefile Thu Mar 1 19:50:55 2018(r330248) +++ head/stand/powerpc/Makefile Thu Mar 1 19:59:49 2018(r330249) @@ -5,8 +5,6 @@ NO_OBJ=t .include SUBDIR=boot1.chrp ofw uboot -.if ${MK_FDT} == "yes" -SUBDIR+= kboot -.endif +SUBDIR.${MK_FDT}+= kboot .include Modified: head/stand/sparc64/Makefile == --- head/stand/sparc64/Makefile Thu Mar 1 19:50:55 2018(r330248) +++ head/stand/sparc64/Makefile Thu Mar 1 19:59:49 2018(r330249) @@ -5,8 +5,6 @@ NO_OBJ=t .include SUBDIR=boot1 loader -.if ${MK_ZFS} != "no" -SUBDIR+=zfsboot zfsloader -.endif +SUBDIR.${MK_ZFS}+=zfsboot zfsloader .include Modified: head/stand/uboot/Makefile == --- head/stand/uboot/Makefile Thu Mar 1 19:50:55 2018(r330248) +++ head/stand/uboot/Makefile Thu Mar 1 19:59:49 2018(r330249) @@ -4,8 +4,6 @@ SUBDIR=lib -.if ${MK_FDT} != "no" -SUBDIR+=fdt -.endif +SUBDIR.${MK_FDT}+=fdt .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330250 - in head/stand: efi i386 powerpc sparc64 uboot
Author: kevans Date: Thu Mar 1 21:46:01 2018 New Revision: 330250 URL: https://svnweb.freebsd.org/changeset/base/330250 Log: stand: Fix build after r330249 One does not simply convert to SUBDIR.yes in stand without making everything else in the affected files SUBDIR.yes -- there are better ways to do this. Modified: head/stand/efi/Makefile head/stand/i386/Makefile head/stand/powerpc/Makefile head/stand/sparc64/Makefile head/stand/uboot/Makefile Modified: head/stand/efi/Makefile == --- head/stand/efi/Makefile Thu Mar 1 19:59:49 2018(r330249) +++ head/stand/efi/Makefile Thu Mar 1 21:46:01 2018(r330250) @@ -9,7 +9,7 @@ NO_OBJ=t .if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 SUBDIR.${MK_FDT}+= fdt -SUBDIR+= libefi loader boot1 +SUBDIR.yes+= libefi loader boot1 .endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 Modified: head/stand/i386/Makefile == --- head/stand/i386/MakefileThu Mar 1 19:59:49 2018(r330249) +++ head/stand/i386/MakefileThu Mar 1 21:46:01 2018(r330250) @@ -4,18 +4,18 @@ NO_OBJ=t .include -SUBDIR=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ +SUBDIR.yes=mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ libi386 SUBDIR.${MK_LOADER_FIREWIRE}+= libfirewire -SUBDIR+= loader +SUBDIR.yes+= loader # special boot programs, 'self-extracting boot2+loader' -SUBDIR+= pxeldr +SUBDIR.yes+= pxeldr .if ${MACHINE_CPUARCH} == "i386" -SUBDIR+= kgzldr +SUBDIR.yes+= kgzldr .endif SUBDIR.${MK_ZFS}+= zfsboot gptzfsboot zfsloader Modified: head/stand/powerpc/Makefile == --- head/stand/powerpc/Makefile Thu Mar 1 19:59:49 2018(r330249) +++ head/stand/powerpc/Makefile Thu Mar 1 21:46:01 2018(r330250) @@ -4,7 +4,7 @@ NO_OBJ=t .include -SUBDIR=boot1.chrp ofw uboot +SUBDIR.yes=boot1.chrp ofw uboot SUBDIR.${MK_FDT}+= kboot .include Modified: head/stand/sparc64/Makefile == --- head/stand/sparc64/Makefile Thu Mar 1 19:59:49 2018(r330249) +++ head/stand/sparc64/Makefile Thu Mar 1 21:46:01 2018(r330250) @@ -4,7 +4,7 @@ NO_OBJ=t .include -SUBDIR=boot1 loader +SUBDIR.yes=boot1 loader SUBDIR.${MK_ZFS}+=zfsboot zfsloader .include Modified: head/stand/uboot/Makefile == --- head/stand/uboot/Makefile Thu Mar 1 19:59:49 2018(r330249) +++ head/stand/uboot/Makefile Thu Mar 1 21:46:01 2018(r330250) @@ -2,7 +2,7 @@ .include -SUBDIR=lib +SUBDIR.yes=lib SUBDIR.${MK_FDT}+=fdt ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330251 - head/tools/build/options
Author: kevans Date: Thu Mar 1 21:51:20 2018 New Revision: 330251 URL: https://svnweb.freebsd.org/changeset/base/330251 Log: Remove LOADER_EFI description files LOADER_EFI functionality got folded into EFI as of r330248. Deleted: head/tools/build/options/WITHOUT_LOADER_EFI head/tools/build/options/WITH_LOADER_EFI ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330252 - head/tools/build/options
Author: kevans Date: Thu Mar 1 21:57:08 2018 New Revision: 330252 URL: https://svnweb.freebsd.org/changeset/base/330252 Log: MFC after:1 week Added: head/tools/build/options/WITHOUT_LOADER_OFW (contents, props changed) head/tools/build/options/WITHOUT_LOADER_UBOOT (contents, props changed) head/tools/build/options/WITH_LOADER_OFW (contents, props changed) head/tools/build/options/WITH_LOADER_UBOOT (contents, props changed) Added: head/tools/build/options/WITHOUT_LOADER_OFW == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LOADER_OFW Thu Mar 1 21:57:08 2018 (r330252) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable building of openfirmware bootloader components. Added: head/tools/build/options/WITHOUT_LOADER_UBOOT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LOADER_UBOOT Thu Mar 1 21:57:08 2018(r330252) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable building of ubldr. Added: head/tools/build/options/WITH_LOADER_OFW == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_OFWThu Mar 1 21:57:08 2018 (r330252) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build openfirmware bootloader components. Added: head/tools/build/options/WITH_LOADER_UBOOT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_UBOOT Thu Mar 1 21:57:08 2018 (r330252) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build ubldr. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330253 - head/tools/build/options
Author: kevans Date: Thu Mar 1 21:59:30 2018 New Revision: 330253 URL: https://svnweb.freebsd.org/changeset/base/330253 Log: Back out r330252; will reapply with an actual commit message Deleted: head/tools/build/options/WITHOUT_LOADER_OFW head/tools/build/options/WITHOUT_LOADER_UBOOT head/tools/build/options/WITH_LOADER_OFW head/tools/build/options/WITH_LOADER_UBOOT ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330254 - head/tools/build/options
Author: kevans Date: Thu Mar 1 22:00:38 2018 New Revision: 330254 URL: https://svnweb.freebsd.org/changeset/base/330254 Log: Add descriptions for recently added loader options Added: head/tools/build/options/WITHOUT_LOADER_OFW - copied unchanged from r330252, head/tools/build/options/WITHOUT_LOADER_OFW head/tools/build/options/WITHOUT_LOADER_UBOOT - copied unchanged from r330252, head/tools/build/options/WITHOUT_LOADER_UBOOT head/tools/build/options/WITH_LOADER_OFW - copied unchanged from r330252, head/tools/build/options/WITH_LOADER_OFW head/tools/build/options/WITH_LOADER_UBOOT - copied unchanged from r330252, head/tools/build/options/WITH_LOADER_UBOOT Copied: head/tools/build/options/WITHOUT_LOADER_OFW (from r330252, head/tools/build/options/WITHOUT_LOADER_OFW) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LOADER_OFW Thu Mar 1 22:00:38 2018 (r330254, copy of r330252, head/tools/build/options/WITHOUT_LOADER_OFW) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable building of openfirmware bootloader components. Copied: head/tools/build/options/WITHOUT_LOADER_UBOOT (from r330252, head/tools/build/options/WITHOUT_LOADER_UBOOT) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LOADER_UBOOT Thu Mar 1 22:00:38 2018(r330254, copy of r330252, head/tools/build/options/WITHOUT_LOADER_UBOOT) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable building of ubldr. Copied: head/tools/build/options/WITH_LOADER_OFW (from r330252, head/tools/build/options/WITH_LOADER_OFW) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_OFWThu Mar 1 22:00:38 2018 (r330254, copy of r330252, head/tools/build/options/WITH_LOADER_OFW) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build openfirmware bootloader components. Copied: head/tools/build/options/WITH_LOADER_UBOOT (from r330252, head/tools/build/options/WITH_LOADER_UBOOT) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_UBOOT Thu Mar 1 22:00:38 2018 (r330254, copy of r330252, head/tools/build/options/WITH_LOADER_UBOOT) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build ubldr. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330255 - head/share/man/man5
Author: kevans Date: Thu Mar 1 22:04:51 2018 New Revision: 330255 URL: https://svnweb.freebsd.org/changeset/base/330255 Log: Regenerate src.conf(5) after r330254 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Thu Mar 1 22:00:38 2018 (r330254) +++ head/share/man/man5/src.conf.5 Thu Mar 1 22:04:51 2018 (r330255) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 28, 2018 +.Dd March 1, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1020,23 +1020,36 @@ Set to use LLVM's libunwind stack unwinder (instead of .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. -.It Va WITHOUT_LOADER_EFI -Set to disable building of EFI bootloader components. -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. -.It Va WITH_LOADER_EFI -Set to build EFI bootloader components. -.Pp -This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and i386/i386. .It Va WITH_LOADER_FIREWIRE Enable firewire support in /boot/loader and /boot/zfsloader on x86. This option is a nop on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. +.Pp +This is a default setting on +arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LOADER_LUA Set to build LUA bindings for the boot loader. +.It Va WITHOUT_LOADER_OFW +Disable building of openfirmware bootloader components. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +.It Va WITH_LOADER_OFW +Set to build openfirmware bootloader components. +.Pp +This is a default setting on +powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITHOUT_LOADER_UBOOT +Disable building of ubldr. +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +.It Va WITH_LOADER_UBOOT +Set to build ubldr. +.Pp +This is a default setting on +arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LOCALES Set to not build localization files; see .Xr locale 1 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330256 - head/sys/sys
Author: eadler Date: Thu Mar 1 22:38:21 2018 New Revision: 330256 URL: https://svnweb.freebsd.org/changeset/base/330256 Log: sys/sys: Use a more common spelling of 'dirent' Submitted by: Domagoj Stolfa MFC After:3 days Modified: head/sys/sys/dirent.h Modified: head/sys/sys/dirent.h == --- head/sys/sys/dirent.h Thu Mar 1 22:04:51 2018(r330255) +++ head/sys/sys/dirent.h Thu Mar 1 22:38:21 2018(r330256) @@ -112,7 +112,7 @@ struct freebsd11_dirent { /* * The _GENERIC_DIRSIZ macro gives the minimum record length which will hold - * the directory entry. This returns the amount of space in struct direct + * the directory entry. This returns the amount of space in struct dirent * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 8 byte boundary. * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330257 - in head/sys: dev/efidev sys
Author: ian Date: Thu Mar 1 22:57:14 2018 New Revision: 330257 URL: https://svnweb.freebsd.org/changeset/base/330257 Log: Add a function to retrieve the EFI realtime clock capabilities. Modified: head/sys/dev/efidev/efirt.c head/sys/sys/efi.h Modified: head/sys/dev/efidev/efirt.c == --- head/sys/dev/efidev/efirt.c Thu Mar 1 22:38:21 2018(r330256) +++ head/sys/dev/efidev/efirt.c Thu Mar 1 22:57:14 2018(r330257) @@ -241,7 +241,7 @@ efi_get_table(struct uuid *uuid, void **ptr) } static int -efi_get_time_locked(struct efi_tm *tm) +efi_get_time_locked(struct efi_tm *tm, struct efi_tmcap *tmcap) { efi_status status; int error; @@ -250,7 +250,7 @@ efi_get_time_locked(struct efi_tm *tm) error = efi_enter(); if (error != 0) return (error); - status = efi_runtime->rt_gettime(tm, NULL); + status = efi_runtime->rt_gettime(tm, tmcap); efi_leave(); error = efi_status_to_errno(status); return (error); @@ -264,7 +264,21 @@ efi_get_time(struct efi_tm *tm) if (efi_runtime == NULL) return (ENXIO); EFI_TIME_LOCK() - error = efi_get_time_locked(tm); + error = efi_get_time_locked(tm, NULL); + EFI_TIME_UNLOCK() + return (error); +} + +int +efi_get_time_capabilities(struct efi_tmcap *tmcap) +{ + struct efi_tm dummy; + int error; + + if (efi_runtime == NULL) + return (ENXIO); + EFI_TIME_LOCK() + error = efi_get_time_locked(&dummy, tmcap); EFI_TIME_UNLOCK() return (error); } Modified: head/sys/sys/efi.h == --- head/sys/sys/efi.h Thu Mar 1 22:38:21 2018(r330256) +++ head/sys/sys/efi.h Thu Mar 1 22:57:14 2018(r330257) @@ -179,6 +179,7 @@ void efi_destroy_1t1_map(void); int efi_rt_ok(void); int efi_get_table(struct uuid *uuid, void **ptr); int efi_get_time(struct efi_tm *tm); +int efi_get_time_capabilities(struct efi_tmcap *tmcap); int efi_reset_system(void); int efi_set_time(struct efi_tm *tm); int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r330256 - head/sys/sys
> Author: eadler > Date: Thu Mar 1 22:38:21 2018 > New Revision: 330256 > URL: https://svnweb.freebsd.org/changeset/base/330256 > > Log: > sys/sys: Use a more common spelling of 'dirent' Actually, correct missed rename of direct to dirent, the name of this structure in 4.2/4.3 was direct, posix renamed it to dirent. The comment probably got missed when the rest of the file was changed. > Submitted by: Domagoj Stolfa > MFC After: 3 days > > Modified: > head/sys/sys/dirent.h > > Modified: head/sys/sys/dirent.h > == > --- head/sys/sys/dirent.h Thu Mar 1 22:04:51 2018(r330255) > +++ head/sys/sys/dirent.h Thu Mar 1 22:38:21 2018(r330256) > @@ -112,7 +112,7 @@ struct freebsd11_dirent { > > /* > * The _GENERIC_DIRSIZ macro gives the minimum record length which will hold > - * the directory entry. This returns the amount of space in struct direct > + * the directory entry. This returns the amount of space in struct dirent > * without the d_name field, plus enough space for the name with a > terminating > * null byte (dp->d_namlen+1), rounded up to a 8 byte boundary. > * > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330260 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake
Author: sjg Date: Fri Mar 2 01:53:50 2018 New Revision: 330260 URL: https://svnweb.freebsd.org/changeset/base/330260 Log: Update to bmake-20180 Fixes segfault in Var_Set if val is NULL Don't treat .info as warning with -W Added: head/contrib/bmake/mk/ldorder.mk - copied unchanged from r330259, vendor/NetBSD/bmake/dist/mk/ldorder.mk Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile.config.in head/contrib/bmake/VERSION head/contrib/bmake/aclocal.m4 head/contrib/bmake/bmake.cat1 head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/job.c head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/auto.obj.mk head/contrib/bmake/mk/dpadd.mk head/contrib/bmake/mk/final.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/lib.mk head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/prog.mk head/contrib/bmake/mk/sys.mk head/contrib/bmake/mk/sys.vars.mk head/contrib/bmake/os.sh head/contrib/bmake/parse.c head/contrib/bmake/stresep.c head/contrib/bmake/unit-tests/varcmd.exp head/contrib/bmake/unit-tests/varcmd.mk head/contrib/bmake/var.c head/usr.bin/bmake/Makefile.config head/usr.bin/bmake/Makefile.inc head/usr.bin/bmake/config.h Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog == --- head/contrib/bmake/ChangeLogThu Mar 1 23:46:02 2018 (r330259) +++ head/contrib/bmake/ChangeLogFri Mar 2 01:53:50 2018 (r330260) @@ -1,3 +1,44 @@ +2018-02-22 Simon J. Gerraty + + * VERSION: 20180222 + Merge with NetBSD make, pick up + o parse.c: avoid calling sysconf for every call to loadfile + +2018-02-18 Simon J. Gerraty + + * VERSION: 20180218 + Merge with NetBSD make, pick up + o var.c: Var_Set handle NULL value anytime. + +2018-02-12 Simon J. Gerraty + + * VERSION: 20180212 + Merge with NetBSD make, pick up + o parse.c: do not treat .info as warning with -W + +2017-12-07 Simon J. Gerraty + + * VERSION: 20171207 + Merge with NetBSD make, pick up + o var.c: Var_Append use Var_Set if var not previously set + so that VAR_CMD is handled correctly. + Add a suitable unit-test. + +2017-11-26 Simon J. Gerraty + + * VERSION (_MAKE_VERSION): 20171126 + + * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ + since AC_TRY_COMPILE puts input inside main() + which upsets modern compilers. + +2017-11-18 Simon J. Gerraty + + * VERSION: 20171118 + Merge with NetBSD make, pick up + o var.c: do not append to variable set on command line + add unit-test to catch this. + 2017-10-28 Simon J. Gerraty * VERSION: 20171028 Modified: head/contrib/bmake/Makefile.config.in == --- head/contrib/bmake/Makefile.config.in Thu Mar 1 23:46:02 2018 (r330259) +++ head/contrib/bmake/Makefile.config.in Fri Mar 2 01:53:50 2018 (r330260) @@ -15,7 +15,7 @@ LDFLAGS= @LDFLAGS@ LIBOBJS= @LIBOBJS@ LDADD= @LIBS@ USE_META= @use_meta@ -FILEMON_H= @filemon_h@ +FILEMON_H?= @filemon_h@ BMAKE_PATH_MAX?= @bmake_path_max@ # used if MAXPATHLEN not defined CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} Modified: head/contrib/bmake/VERSION == --- head/contrib/bmake/VERSION Thu Mar 1 23:46:02 2018(r330259) +++ head/contrib/bmake/VERSION Fri Mar 2 01:53:50 2018(r330260) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20171028 +_MAKE_VERSION=20180222 Modified: head/contrib/bmake/aclocal.m4 == --- head/contrib/bmake/aclocal.m4 Thu Mar 1 23:46:02 2018 (r330259) +++ head/contrib/bmake/aclocal.m4 Fri Mar 2 01:53:50 2018 (r330260) @@ -1,5 +1,5 @@ dnl RCSid: -dnl$Id: aclocal.m4,v 1.5 2003/03/06 21:21:30 sjg Exp $ +dnl$Id: aclocal.m4,v 1.6 2017/11/26 22:39:20 sjg Exp $ dnl dnl @@ -55,16 +55,21 @@ dnl AC_DEFUN(AC_C___ATTRIBUTE__, [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ -AC_TRY_COMPILE([ +AC_LINK_IFELSE([ #include -], -[ + static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); +} + +int +main(int argc, char **argv) +{ + foo(); } ], ac_cv___attribute__=yes, Modified: head/contrib/bmake/bmake.cat1 == --- head/contrib/bmake/bmake.cat1 Thu Mar 1 23:46:02 2018 (r330259) +++ head/contrib/bma
svn commit: r330261 - head/stand/lua
Author: kevans Date: Fri Mar 2 02:39:16 2018 New Revision: 330261 URL: https://svnweb.freebsd.org/changeset/base/330261 Log: lualoader: Fix some lint-mentioned errors - nextbootfile is not a variable, but nextboot_file is - pstatus was explicitly initialized but later clobbered, so don't initialize it. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua == --- head/stand/lua/config.lua Fri Mar 2 01:53:50 2018(r330260) +++ head/stand/lua/config.lua Fri Mar 2 02:39:16 2018(r330261) @@ -173,7 +173,7 @@ local function checkNextboot() end if not config.parse(text) then - print(MSG_FAILPARSECFG:format(nextbootfile)) + print(MSG_FAILPARSECFG:format(nextboot_file)) end -- Attempt to rewrite the first line and only the first line of the @@ -274,7 +274,7 @@ end function config.loadmod(mod, silent) local status = true - local pstatus = true + local pstatus for k, v in pairs(mod) do if v.load == "YES" then local str = "load " ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330262 - head/stand/lua
Author: kevans Date: Fri Mar 2 02:39:41 2018 New Revision: 330262 URL: https://svnweb.freebsd.org/changeset/base/330262 Log: lualoader: Use #str instead of tracking length with 'n' We really gain almost nothing by tracking length separately, especially when it's as easy as "#str", so reduce complexity. Modified: head/stand/lua/password.lua Modified: head/stand/lua/password.lua == --- head/stand/lua/password.lua Fri Mar 2 02:39:16 2018(r330261) +++ head/stand/lua/password.lua Fri Mar 2 02:39:41 2018(r330262) @@ -42,7 +42,6 @@ local twiddle_chars = {"/", "-", "\\", "|"} -- Module exports function password.read(prompt_length) local str = "" - local n = 0 local twiddle_pos = 1 local function draw_twiddle() @@ -60,14 +59,13 @@ function password.read(prompt_length) break end if ch == core.KEY_BACKSPACE or ch == core.KEY_DELETE then - if n > 0 then - n = n - 1 + if #str > 0 then if show_password_mask then loader.printc("\008 \008") else draw_twiddle() end - str = str:sub(1, n) + str = str:sub(1, #str - 1) end else if show_password_mask then @@ -76,7 +74,6 @@ function password.read(prompt_length) draw_twiddle() end str = str .. string.char(ch) - n = n + 1 end end return str ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330263 - head/stand/lua
Author: kevans Date: Fri Mar 2 03:05:36 2018 New Revision: 330263 URL: https://svnweb.freebsd.org/changeset/base/330263 Log: lualoader: Use string literal \xNN instead of string.char() Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua == --- head/stand/lua/drawer.lua Fri Mar 2 02:39:41 2018(r330262) +++ head/stand/lua/drawer.lua Fri Mar 2 03:05:36 2018(r330263) @@ -313,13 +313,13 @@ function drawer.drawbox() local w = drawer.box_pos_dim.w local h = drawer.box_pos_dim.h - local hl = string.char(0xCD) - local vl = string.char(0xBA) + local hl = "\xCD" + local vl = "\xBA" - local tl = string.char(0xC9) - local bl = string.char(0xC8) - local tr = string.char(0xBB) - local br = string.char(0xBC) + local tl = "\xC9" + local bl = "\xC8" + local tr = "\xBB" + local br = "\xBC" screen.setcursor(x, y); print(tl) screen.setcursor(x, y+h); print(bl) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r326257 - in head/sys/amd64: acpica amd64 ia32 include include/pc linux32 pci vmm vmm/amd vmm/intel vmm/io
On 27 November 2017 at 10:03, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Nov 27 15:03:07 2017 > New Revision: 326257 > URL: https://svnweb.freebsd.org/changeset/base/326257 > > Log: > sys/amd64: further adoption of SPDX licensing ID tags. ... > Modified: head/sys/amd64/linux32/linux32_machdep.c > == > --- head/sys/amd64/linux32/linux32_machdep.cMon Nov 27 15:01:59 2017 > (r326256) > +++ head/sys/amd64/linux32/linux32_machdep.cMon Nov 27 15:03:07 2017 > (r326257) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-3-Clause > + * A few Linuxulator files gained a BSD-3-Clause tag, but they're not actually 3-Clause BSD; they have a small addition to the first clause, which ends with "in this position and unchanged." I've been going through the Linuxulator source files to rationalize the license text (see review D14210) but am waiting on confirmation from a few copyright holders before all files can be cleaned up. Until that happens I think we should just remove the SPDX tags from these files. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r326257 - in head/sys/amd64: acpica amd64 ia32 include include/pc linux32 pci vmm vmm/amd vmm/intel vmm/io
On 01/03/2018 22:26, Ed Maste wrote: On 27 November 2017 at 10:03, Pedro F. Giffuni wrote: Author: pfg Date: Mon Nov 27 15:03:07 2017 New Revision: 326257 URL: https://svnweb.freebsd.org/changeset/base/326257 Log: sys/amd64: further adoption of SPDX licensing ID tags. ... Modified: head/sys/amd64/linux32/linux32_machdep.c == --- head/sys/amd64/linux32/linux32_machdep.cMon Nov 27 15:01:59 2017 (r326256) +++ head/sys/amd64/linux32/linux32_machdep.cMon Nov 27 15:03:07 2017 (r326257) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * A few Linuxulator files gained a BSD-3-Clause tag, but they're not actually 3-Clause BSD; they have a small addition to the first clause, which ends with "in this position and unchanged." I've been going through the Linuxulator source files to rationalize the license text (see review D14210) but am waiting on confirmation from a few copyright holders before all files can be cleaned up. Until that happens I think we should just remove the SPDX tags from these files. Yes, that sounds right. Feel free to drop the SPDX tags from anything that looks suspicious. Pedro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r330264 - in head: lib/libufs stand/libsa sys/geom sys/geom/journal sys/geom/label sys/ufs/ffs
Author: mckusick Date: Fri Mar 2 04:34:53 2018 New Revision: 330264 URL: https://svnweb.freebsd.org/changeset/base/330264 Log: This change is some refactoring of Mark Johnston's changes in r329375 to fix the memory leak that I introduced in r328426. Instead of trying to clear up the possible memory leak in all the clients, I ensure that it gets cleaned up in the source (e.g., ffs_sbget ensures that memory is always freed if it returns an error). The original change in r328426 was a bit sparse in its description. So I am expanding on its description here (thanks cem@ and rgrimes@ for your encouragement for my longer commit messages). In preparation for adding check hashing to superblocks, r328426 is a refactoring of the code to get the reading/writing of the superblock into one place. Unlike the cylinder group reading/writing which ends up in two places (ffs_getcg/ffs_geom_strategy in the kernel and cgget/cgput in libufs), I have the core superblock functions just in the kernel (ffs_sbfetch/ffs_sbput in ffs_subr.c which is already imported into utilities like fsck_ffs as well as libufs to implement sbget/sbput). The ffs_sbfetch and ffs_sbput functions take a function pointer to do the actual I/O for which there are four variants: ffs_use_bread / ffs_use_bwrite for the in-kernel filesystem g_use_g_read_data / g_use_g_write_data for kernel geom clients ufs_use_sa_read for the standalone code (stand/libsa/ufs.c but not stand/libsa/ufsread.c which is size constrained) use_pread / use_pwrite for libufs Uses of these interfaces are in the UFS filesystem, geoms journal & label, libsa changes, and libufs. They also permeate out into the filesystem utilities fsck_ffs, newfs, growfs, clri, dump, quotacheck, fsirand, fstyp, and quot. Some of these utilities should probably be converted to directly use libufs (like dumpfs was for example), but there does not seem to be much win in doing so. Tested by: Peter Holm (pho@) Modified: head/lib/libufs/sblock.c head/stand/libsa/ufs.c head/sys/geom/geom_io.c head/sys/geom/journal/g_journal_ufs.c head/sys/geom/label/g_label_ufs.c head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/lib/libufs/sblock.c == --- head/lib/libufs/sblock.cFri Mar 2 03:05:36 2018(r330263) +++ head/lib/libufs/sblock.cFri Mar 2 04:34:53 2018(r330264) @@ -150,7 +150,6 @@ use_pread(void *devfd, off_t loc, void **bufp, int siz int fd; fd = *(int *)devfd; - free(*bufp); if ((*bufp = malloc(size)) == NULL) return (ENOSPC); if (pread(fd, *bufp, size, loc) != size) Modified: head/stand/libsa/ufs.c == --- head/stand/libsa/ufs.c Fri Mar 2 03:05:36 2018(r330263) +++ head/stand/libsa/ufs.c Fri Mar 2 04:34:53 2018(r330264) @@ -518,7 +518,7 @@ ufs_open(upath, f) /* read super block */ twiddle(1); - if ((rc = ffs_sbget(f, &fs, -1, 0, ufs_use_sa_read)) != 0) + if ((rc = ffs_sbget(f, &fs, -1, "stand", ufs_use_sa_read)) != 0) goto out; fp->f_fs = fs; /* @@ -688,7 +688,6 @@ ufs_use_sa_read(void *devfd, off_t loc, void **bufp, i int error; f = (struct open_file *)devfd; - free(*bufp); if ((*bufp = malloc(size)) == NULL) return (ENOSPC); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, loc / DEV_BSIZE, Modified: head/sys/geom/geom_io.c == --- head/sys/geom/geom_io.c Fri Mar 2 03:05:36 2018(r330263) +++ head/sys/geom/geom_io.c Fri Mar 2 04:34:53 2018(r330264) @@ -957,6 +957,9 @@ g_use_g_read_data(void *devfd, off_t loc, void **bufp, { struct g_consumer *cp; + KASSERT(*bufp == NULL, + ("g_use_g_read_data: non-NULL *bufp %p\n", *bufp)); + cp = (struct g_consumer *)devfd; /* * Take care not to issue an invalid I/O request. The offset of @@ -966,8 +969,6 @@ g_use_g_read_data(void *devfd, off_t loc, void **bufp, */ if (loc % cp->provider->sectorsize != 0) return (ENOENT); - if (*bufp != NULL) - g_free(*bufp); *bufp = g_read_data(cp, loc, size, NULL); if (*bufp == NULL) return (ENOENT); Modified: head/sys/geom/journal/g_journal_ufs.c == --- head/sys/geom/journal/g_journal_ufs.c Fri Mar 2 03:05:36 2018 (r330263) +++ head/sys/geom/journal/g_journal_ufs.c Fri Mar 2 04:34:53 2018 (r330264) @@ -72,11 +72,11 @@ g_journal_ufs_dirty(struct g_consumer *cp) fs = NULL;
svn commit: r330267 - head/stand/lua
Author: kevans Date: Fri Mar 2 05:35:14 2018 New Revision: 330267 URL: https://svnweb.freebsd.org/changeset/base/330267 Log: Add core.lua(8), but do not add to distribution Distribution will be done after all of the lualoader manpages are created. Reviewed by: rpokala Differential Revision:https://reviews.freebsd.org/D14479 Added: head/stand/lua/core.lua.8 (contents, props changed) Added: head/stand/lua/core.lua.8 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/core.lua.8 Fri Mar 2 05:35:14 2018(r330267) @@ -0,0 +1,222 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 2, 2018 +.Dt CORE.LUA 8 +.Os +.Sh NAME +.Nm core.lua +.Nd FreeBSD core module +.Sh DESCRIPTION +.Nm +contains core functionality that does not have a more fitting module. +.Pp +Before hooking into or using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local core = require("core") +.Ss CONSTANTS +The following raw key code constants are defined in +.Nm : +.Bl -tag -width KEY_BACKSPACE -compact -offset indent +.It Ic KEY_BACKSPACE +The backspace code. +Should generally be checked along with +.Ic KEY_DELETE +for backspace functionality. +.It Ic KEY_ENTER +The enter key, or hard return. +.It Ic KEY_DELETE +The delete code. +Should generally be checked along with +.Ic KEY_BACKSPACE +for backspace functionality. +.El +.Pp +The following key-string constants are defined in +.Nm : +.Bl -tag -width KEYSTR_ESCAPE -compact -offset indent +.It Ic KEYSTR_ESCAPE +The escape key. +.El +.Pp +The following menu entry type constants are defined in +.Nm : +.Bl -tag -width MENU_CAROUSEL_ENTRY -compact -offset indent +.It Ic MENU_RETURN +Return to the parent menu. +.It Ic MENU_ENTRY +A normal menu entry. +.It Ic MENU_SEPARATOR +A menu entry that serves as a separator. +.It Ic MENU_SUBMENU +A menu entry that opens a submenu when selected. +.It Ic MENU_CAROUSEL_ENTRY +A menu entry that rotates through items like a carousel upon selection of the +menu entry. +.El +.Pp +Please see +.Xr menu.lua 8 +for extended descriptions and usage of the +.Ic MENU_* +constants. +.Ss Exported functions +The following functions are exported from +.Nm : +.Bl -tag -width core.getACPIPresent -offset indent +.It Fn core.setVerbose verbose +Sets or unsets +.Ev boot_verbose . +If +.Fa verbose +is omitted, toggle the current verbose setting. +.It Fn core.setSingleUser singleUser +Sets or unsets +.Ev boot_single . +If +.Fa singleUser +is omitted, toggle the current single user setting. +.It Fn core.getACPIPresent checkingSystemDefaults +Check whether ACPI is present. +This will only be accurate for i386-compatible loaders, including non-UEFI +loaders on amd64 systems. +If +.Fa checkingSystemDefaults +is true, ignore the current value of +.Ev hint.acpi.0.disabled . +Otherwise, return true only if ACPI is both present and not disabled. +.It Fn core.setACPI acpi +Sets or unsets +.Ev acpi_load , +.Ev hint.acpi.0.disabled , +and +.Ev loader.acpi_disabled_by_user . +If +.Fa acpi +is omitted, toggle the current ACPI setting. +.It Fn core.setSafeMode safeMode +Set the safe mode setting. +Sets or unsets +.Ev kern.smp.disabled , +.Ev hw.ata.ata_dma , +.Ev hw.ata.atapi_dma , +.Ev hw.ata.wc , +.Ev hw.eisa_slots , +.Ev kern.eventtimer.periodic , +and +.Ev kern.geom.part.check_integrity . +If +.Fa safeMode +is omitted, toggle the current safe mode setting. +.It Fn core.kern
svn commit: r330268 - head/stand/lua
Author: kevans Date: Fri Mar 2 05:36:04 2018 New Revision: 330268 URL: https://svnweb.freebsd.org/changeset/base/330268 Log: Add menu.lua(8), but do not add to distribution Distribution will be done after all of the lualoader manpages are created. Reviewed by: rpokala Differential Revision:https://reviews.freebsd.org/D14480 Added: head/stand/lua/menu.lua.8 (contents, props changed) Added: head/stand/lua/menu.lua.8 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/menu.lua.8 Fri Mar 2 05:36:04 2018(r330268) @@ -0,0 +1,236 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 23, 2018 +.Dt MENU.LUA 8 +.Os +.Sh NAME +.Nm menu.lua +.Nd FreeBSD dynamic menu boot module +.Sh DESCRIPTION +.Nm +contains the main functionality required to build a dynamic menu system. +It also contains definitions for the built-in menus, some of which are +influenced by +.Xr loader 8 +environment variables. +.Pp +Before hooking into the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local menu = require("menu") +.Ss MENU DEFINITIONS +Menus are represented in +.Nm +as a table. +That table +.Sy must +contain an +.Va entries +key. +.Pp +If the value of the +.Va entries +key is itself a table, then each value in this table defines a single entry in +this menu. +See +.Sx MENU ITEM DEFINITIONS +for the structure of each entry. +.Pp +.Va entries +may also be a function. +This function must return a table, each value of which defines a single entry +in this menu. +See +.Sx MENU ITEM DEFINITIONS . +.Ss MENU ITEM DEFINITIONS +The following keys may be defined for a menu item: +.Bl -tag -width disable-module_module -offset indent +.It Ic entry_type +The type of this menu entry. +See +.Sx MENU ITEM TYPES . +.It Ic carousel_id +A unique string id for this carousel. +A carousel is a menu entry that rotates through a selection of items. +Used for storage of the carousel's current setting. +.It Ic visible +A lambda that returns +.Dv true +if this menu item should be visible and +.Dv false +if it should not be visible. +.It Ic items +A table (or a lambda that returns a table) of the possible choices for this +carousel. +.It Ic name +A string (or a lambda that returns a string) containing the current name of this +item. +.It Ic func +The function executed when this entry is selected. +Every type except for +.Ic core.MENU_SEPARATOR +may have a +.Ic func . +.It Ic submenu +The submenu menu definition to draw when this entry is selected. +.It Ic alias +A table of case-sensitive aliases for this menu entry. +All menu entries that can be selected may have any number of +.Ic alias +entries. +.El +.Pp +.Ic entry_type +is the only required key for every entry type. +.Ic name +is required for all entry types except for +.Ic core.MENU_SEPARATOR . +.Ss MENU ITEM TYPES +The menu item type constants are defined in +.Xr core.lua 8 . +The following types are available: +.Bl -tag -width core.MENU_CAROUSEL_ENTRY -offset indent +.It Ic core.MENU_RETURN +Return to the parent menu. +If the current menu is the default menu, +.Nm +will exit the menu and begin the autoboot sequence (if applicable). +This type of menu entry may execute +.Ic func , +when selected, and has a +.Ic name . +.It Ic core.MENU_ENTRY +A normal menu entry that executes +.Ic func +when selected, and has a +.Ic name . +.It Ic core.MENU_SEPARATOR +A menu entry that serves as a s
svn commit: r330269 - head/stand/lua
Author: kevans Date: Fri Mar 2 05:38:08 2018 New Revision: 330269 URL: https://svnweb.freebsd.org/changeset/base/330269 Log: core.lua(8): Add missing note about core.KEYSTR_CSI Modified: head/stand/lua/core.lua.8 Modified: head/stand/lua/core.lua.8 == --- head/stand/lua/core.lua.8 Fri Mar 2 05:36:04 2018(r330268) +++ head/stand/lua/core.lua.8 Fri Mar 2 05:38:08 2018(r330269) @@ -65,6 +65,8 @@ The following key-string constants are defined in .Bl -tag -width KEYSTR_ESCAPE -compact -offset indent .It Ic KEYSTR_ESCAPE The escape key. +.It Ic KEYSTR_CSI +The ANSI CSI sequence. .El .Pp The following menu entry type constants are defined in ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r330264 - in head: lib/libufs stand/libsa sys/geom sys/geom/journal sys/geom/label sys/ufs/ffs
On Fri, 2 Mar 2018 04:34:53 + (UTC) Kirk McKusick wrote: > Author: mckusick > Date: Fri Mar 2 04:34:53 2018 > New Revision: 330264 > URL: https://svnweb.freebsd.org/changeset/base/330264 > > Log: > This change is some refactoring of Mark Johnston's changes in r329375 > to fix the memory leak that I introduced in r328426. Instead of > trying to clear up the possible memory leak in all the clients, I > ensure that it gets cleaned up in the source (e.g., ffs_sbget ensures > that memory is always freed if it returns an error). > > The original change in r328426 was a bit sparse in its description. > So I am expanding on its description here (thanks cem@ and rgrimes@ > for your encouragement for my longer commit messages). > > In preparation for adding check hashing to superblocks, r328426 is > a refactoring of the code to get the reading/writing of the superblock > into one place. Unlike the cylinder group reading/writing which > ends up in two places (ffs_getcg/ffs_geom_strategy in the kernel > and cgget/cgput in libufs), I have the core superblock functions > just in the kernel (ffs_sbfetch/ffs_sbput in ffs_subr.c which is > already imported into utilities like fsck_ffs as well as libufs to > implement sbget/sbput). The ffs_sbfetch and ffs_sbput functions > take a function pointer to do the actual I/O for which there are > four variants: > > ffs_use_bread / ffs_use_bwrite for the in-kernel filesystem > > g_use_g_read_data / g_use_g_write_data for kernel geom clients > > ufs_use_sa_read for the standalone code (stand/libsa/ufs.c > but not stand/libsa/ufsread.c which is size constrained) > > use_pread / use_pwrite for libufs > > Uses of these interfaces are in the UFS filesystem, geoms journal & > label, libsa changes, and libufs. They also permeate out into the > filesystem utilities fsck_ffs, newfs, growfs, clri, dump, quotacheck, > fsirand, fstyp, and quot. Some of these utilities should probably be > converted to directly use libufs (like dumpfs was for example), but > there does not seem to be much win in doing so. > > Tested by: Peter Holm (pho@) > > Modified: > head/lib/libufs/sblock.c > head/stand/libsa/ufs.c > head/sys/geom/geom_io.c > head/sys/geom/journal/g_journal_ufs.c > head/sys/geom/label/g_label_ufs.c > head/sys/ufs/ffs/ffs_subr.c > head/sys/ufs/ffs/ffs_vfsops.c > > Modified: head/lib/libufs/sblock.c > == > --- head/lib/libufs/sblock.c Fri Mar 2 03:05:36 2018(r330263) > +++ head/lib/libufs/sblock.c Fri Mar 2 04:34:53 2018(r330264) > @@ -150,7 +150,6 @@ use_pread(void *devfd, off_t loc, void **bufp, int siz > int fd; > > fd = *(int *)devfd; > - free(*bufp); > if ((*bufp = malloc(size)) == NULL) > return (ENOSPC); > if (pread(fd, *bufp, size, loc) != size) > > Modified: head/stand/libsa/ufs.c > == > --- head/stand/libsa/ufs.cFri Mar 2 03:05:36 2018(r330263) > +++ head/stand/libsa/ufs.cFri Mar 2 04:34:53 2018(r330264) > @@ -518,7 +518,7 @@ ufs_open(upath, f) > > /* read super block */ > twiddle(1); > - if ((rc = ffs_sbget(f, &fs, -1, 0, ufs_use_sa_read)) != 0) > + if ((rc = ffs_sbget(f, &fs, -1, "stand", ufs_use_sa_read)) != 0) > goto out; > fp->f_fs = fs; > /* > @@ -688,7 +688,6 @@ ufs_use_sa_read(void *devfd, off_t loc, void **bufp, i > int error; > > f = (struct open_file *)devfd; > - free(*bufp); > if ((*bufp = malloc(size)) == NULL) > return (ENOSPC); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, loc / > DEV_BSIZE, > > Modified: head/sys/geom/geom_io.c > == > --- head/sys/geom/geom_io.c Fri Mar 2 03:05:36 2018(r330263) > +++ head/sys/geom/geom_io.c Fri Mar 2 04:34:53 2018(r330264) > @@ -957,6 +957,9 @@ g_use_g_read_data(void *devfd, off_t loc, void **bufp, > { > struct g_consumer *cp; > > + KASSERT(*bufp == NULL, > + ("g_use_g_read_data: non-NULL *bufp %p\n", *bufp)); > + > cp = (struct g_consumer *)devfd; > /* >* Take care not to issue an invalid I/O request. The offset of > @@ -966,8 +969,6 @@ g_use_g_read_data(void *devfd, off_t loc, void **bufp, >*/ > if (loc % cp->provider->sectorsize != 0) > return (ENOENT); > - if (*bufp != NULL) > - g_free(*bufp); > *bufp = g_read_data(cp, loc, size, NULL); > if (*bufp == NULL) > return (ENOENT); > > Modified: head/sys/geom/journal/g_journal_ufs.c > == > --- head/sys/geom/journal/g_journal_ufs.c Fri Ma
svn commit: r330270 - head/sys/geom/label
Author: cem Date: Fri Mar 2 06:02:54 2018 New Revision: 330270 URL: https://svnweb.freebsd.org/changeset/base/330270 Log: g_label_ufs: Fix typo from r330264 Reported by: O. Hartmann Sponsored by: Dell EMC Isilon Modified: head/sys/geom/label/g_label_ufs.c Modified: head/sys/geom/label/g_label_ufs.c == --- head/sys/geom/label/g_label_ufs.c Fri Mar 2 05:38:08 2018 (r330269) +++ head/sys/geom/label/g_label_ufs.c Fri Mar 2 06:02:54 2018 (r330270) @@ -79,7 +79,7 @@ g_label_ufs_taste_common(struct g_consumer *cp, char * if (SBLOCKSIZE % pp->sectorsize != 0 || ffs_sbget(cp, &fs, -1, M_GEOM, g_use_g_read_data) != 0) { KASSERT(fs == NULL, - ("g_label_ufs_taste_common: non-NULL fs %p\n",fs); + ("g_label_ufs_taste_common: non-NULL fs %p\n", fs)); return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r330264 - in head: lib/libufs stand/libsa sys/geom sys/geom/journal sys/geom/label sys/ufs/ffs
On Thu, Mar 1, 2018 at 9:40 PM, O. Hartmann wrote: > On Fri, 2 Mar 2018 04:34:53 + (UTC) > Kirk McKusick wrote: > >> Author: mckusick >> Date: Fri Mar 2 04:34:53 2018 >> New Revision: 330264 >> URL: https://svnweb.freebsd.org/changeset/base/330264 >> ... > > Recent build of a kernel on CURRENT fails for me due to: > > [...] > --- g_label_ufs.o --- > /pool/sources/CURRENT/src/sys/geom/label/g_label_ufs.c:81:3: error: > unterminated function-like macro invocation KASSERT(fs == NULL, > ^ Should be fixed in r330270. Thanks, Conrad ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"