diff options
| -rw-r--r-- | lib/atf/Makefile.inc | 2 | ||||
| -rw-r--r-- | lib/atf/libatf-c++/tests/Makefile | 2 | ||||
| -rw-r--r-- | lib/atf/libatf-c++/tests/detail/Makefile | 2 | ||||
| -rw-r--r-- | lib/atf/libatf-c/tests/Makefile | 2 | ||||
| -rw-r--r-- | lib/atf/libatf-c/tests/detail/Makefile | 2 | ||||
| -rw-r--r-- | lib/atf/tests/Makefile | 3 | ||||
| -rw-r--r-- | libexec/atf/Makefile.inc | 2 | ||||
| -rw-r--r-- | libexec/atf/atf-check/tests/Makefile | 2 | ||||
| -rw-r--r-- | libexec/atf/tests/Makefile | 3 | ||||
| -rw-r--r-- | release/tools/vmimage.subr | 6 | ||||
| -rw-r--r-- | secure/lib/libcrypto/Makefile.inc | 2 | ||||
| -rw-r--r-- | sys/dev/random/fenestrasX/fx_pool.c | 12 | ||||
| -rw-r--r-- | sys/dev/random/random_harvestq.c | 6 | ||||
| -rw-r--r-- | usr.sbin/sysrc/sysrc.8 | 89 |
14 files changed, 80 insertions, 55 deletions
diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc index bebed0280596..af176036f136 100644 --- a/lib/atf/Makefile.inc +++ b/lib/atf/Makefile.inc @@ -24,7 +24,7 @@ # SUCH DAMAGE. # -PACKAGE= atf +PACKAGE?= atf LIB_PACKAGE= CFLAGS+= -DHAVE_CONFIG_H diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile index 839c6902d6b1..dc052c19df67 100644 --- a/lib/atf/libatf-c++/tests/Makefile +++ b/lib/atf/libatf-c++/tests/Makefile @@ -1,5 +1,7 @@ .include <bsd.init.mk> +PACKAGE= tests + TESTS_SUBDIRS= detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/atf/libatf-c++/tests/detail/Makefile b/lib/atf/libatf-c++/tests/detail/Makefile index 4b95f8dbd663..55cefe524068 100644 --- a/lib/atf/libatf-c++/tests/detail/Makefile +++ b/lib/atf/libatf-c++/tests/detail/Makefile @@ -1,5 +1,7 @@ .include <bsd.init.mk> +PACKAGE= tests + TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile index 5647e7b9fcbe..c81c18a91f00 100644 --- a/lib/atf/libatf-c/tests/Makefile +++ b/lib/atf/libatf-c/tests/Makefile @@ -1,5 +1,7 @@ .include <bsd.init.mk> +PACKAGE= tests + TESTS_SUBDIRS= detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/atf/libatf-c/tests/detail/Makefile b/lib/atf/libatf-c/tests/detail/Makefile index 5123f6f4d796..3fa2919b98b9 100644 --- a/lib/atf/libatf-c/tests/detail/Makefile +++ b/lib/atf/libatf-c/tests/detail/Makefile @@ -1,5 +1,7 @@ .include <bsd.init.mk> +PACKAGE= tests + TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail ATF= ${SRCTOP}/contrib/atf diff --git a/lib/atf/tests/Makefile b/lib/atf/tests/Makefile index 500ff0f20c3b..2609bb593d57 100644 --- a/lib/atf/tests/Makefile +++ b/lib/atf/tests/Makefile @@ -1,4 +1,7 @@ .PATH: ${SRCTOP}/tests + +PACKAGE= tests + KYUAFILE= yes SUBDIR= test-programs diff --git a/libexec/atf/Makefile.inc b/libexec/atf/Makefile.inc index e40827fa0b69..5fd06c35cd09 100644 --- a/libexec/atf/Makefile.inc +++ b/libexec/atf/Makefile.inc @@ -24,7 +24,7 @@ # SUCH DAMAGE. # -PACKAGE= atf +PACKAGE?= atf LIB_PACKAGE= CFLAGS+= -DHAVE_CONFIG_H diff --git a/libexec/atf/atf-check/tests/Makefile b/libexec/atf/atf-check/tests/Makefile index e98f82d941cd..6e21e4ede211 100644 --- a/libexec/atf/atf-check/tests/Makefile +++ b/libexec/atf/atf-check/tests/Makefile @@ -1,6 +1,8 @@ ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh +PACKAGE= tests + ATF_TESTS_SH= atf-check_test .include <bsd.test.mk> diff --git a/libexec/atf/tests/Makefile b/libexec/atf/tests/Makefile index 29b1b564beca..ad9431e75a63 100644 --- a/libexec/atf/tests/Makefile +++ b/libexec/atf/tests/Makefile @@ -1,4 +1,7 @@ .PATH: ${SRCTOP}/tests + +PACKAGE= tests + KYUAFILE= yes .include <bsd.test.mk> diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 8531e9b8f2d6..92f00f9cf7c3 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -449,7 +449,11 @@ vm_create_disk() { # Create an ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}" + espsuffix="" + if [ -z "${BOOTPARTS}" ]; then + espsuffix="${BOOTPARTSOFFSET}" + fi + BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}${espsuffix}" # Add this to fstab mkdir -p ${DESTDIR}/boot/efi diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 5b281166df61..73c650d590ff 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -1,6 +1,6 @@ .include <bsd.own.mk> -PACKAGE= openssl +PACKAGE?= openssl LIB_PACKAGE= LCRYPTO_SRC= ${SRCTOP}/crypto/openssl diff --git a/sys/dev/random/fenestrasX/fx_pool.c b/sys/dev/random/fenestrasX/fx_pool.c index 95c2d223e0de..3aefe17a045a 100644 --- a/sys/dev/random/fenestrasX/fx_pool.c +++ b/sys/dev/random/fenestrasX/fx_pool.c @@ -127,7 +127,7 @@ static const struct fxrng_ent_cls fxrng_garbage = { */ static const struct fxrng_ent_char { const struct fxrng_ent_cls *entc_cls; -} fxrng_ent_char[ENTROPYSOURCE] = { +} fxrng_ent_char[/*ENTROPYSOURCE*/] = { [RANDOM_CACHED] = { .entc_cls = &fxrng_hi_push, }, @@ -206,7 +206,17 @@ static const struct fxrng_ent_char { [RANDOM_PURE_VMGENID] = { .entc_cls = &fxrng_hi_push, }, + [RANDOM_PURE_QUALCOMM] = { + .entc_cls = &fxrng_hi_pull, + }, + [RANDOM_PURE_ARMV8] = { + .entc_cls = &fxrng_hi_pull, + }, + [RANDOM_PURE_ARM_TRNG] = { + .entc_cls = &fxrng_hi_pull, + }, }; +CTASSERT(nitems(fxrng_ent_char) == ENTROPYSOURCE); /* Useful for single-bit-per-source state. */ BITSET_DEFINE(fxrng_bits, ENTROPYSOURCE); diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index e38fd38c310b..f2206044fe7d 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -88,7 +88,7 @@ static void random_sources_feed(void); static __read_mostly bool epoch_inited; static __read_mostly epoch_t rs_epoch; -static const char *random_source_descr[ENTROPYSOURCE]; +static const char *random_source_descr[]; /* * How many events to queue up. We create this many items in @@ -109,6 +109,7 @@ volatile int random_kthread_control; * Updates are synchronized by the harvest mutex. */ __read_frequently u_int hc_source_mask; +CTASSERT(ENTROPYSOURCE <= sizeof(hc_source_mask) * NBBY); struct random_sources { CK_LIST_ENTRY(random_sources) rrs_entries; @@ -647,7 +648,7 @@ SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask_bin, random_print_harvestmask, "A", "Entropy harvesting mask (printable)"); -static const char *random_source_descr[ENTROPYSOURCE] = { +static const char *random_source_descr[/*ENTROPYSOURCE*/] = { [RANDOM_CACHED] = "CACHED", [RANDOM_ATTACH] = "ATTACH", [RANDOM_KEYBOARD] = "KEYBOARD", @@ -679,6 +680,7 @@ static const char *random_source_descr[ENTROPYSOURCE] = { [RANDOM_PURE_ARM_TRNG] = "PURE_ARM_TRNG", /* "ENTROPYSOURCE" */ }; +CTASSERT(nitems(random_source_descr) == ENTROPYSOURCE); static int random_print_harvestmask_symbolic(SYSCTL_HANDLER_ARGS) diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8 index bdf3353c2cf9..cb32f72ea587 100644 --- a/usr.sbin/sysrc/sysrc.8 +++ b/usr.sbin/sysrc/sysrc.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2011-2016 Devin Teske .\" All rights reserved. .\" @@ -408,62 +411,52 @@ and .It Pa /usr/local/etc/rc.conf.d/name/* .El .Sh EXAMPLES -Below are some simple examples of how -.Nm -can be used to query certain values from the -.Xr rc.conf 5 -collection of system configuration files: -.Pp -.Nm -sshd_enable -.Dl returns the value of $sshd_enable, usually YES or NO . +.Ss Working with rc.conf files +Ask the value of +.Cm sshd_enable , +usually YES or NO: +.Dl sysrc sshd_enable .Pp -.Nm -defaultrouter -.Dl returns IP address of default router Pq if configured . -.Pp -Working on other files, such as +Return the IP address of default router +.Pq if configured : +.Dl sysrc defaultrouter +.Ss Working with other files +Return the value of the MAILTO setting, if configured, from .Xr crontab 5 : +.Dl sysrc -f /etc/crontab MAILTO .Pp -.Nm --f /etc/crontab MAILTO -.Dl returns the value of the MAILTO setting Pq if configured . -.Pp -Appending to existing values: -.Pp -.Nm -\&cloned_interfaces+=gif0 -.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES . -.Pp -.Nm -\&cloned_interfaces-=gif0 -.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES . -.Pp -In addition to the above syntax, -.Nm -also supports inline -.Xr sh 1 -PARAMETER expansion for changing the way values are reported, shown below: +Append +.Dq gif0 +to $cloned_interfaces +.Pq see Sx APPENDING VALUES : +.Dl sysrc cloned_interfaces+=gif0 .Pp -.Nm -\&'hostname%%.*' -.Dl returns $hostname up to (but not including) first `.' . +Remove +.Dq gif0 +from $cloned_interfaces +.Pq see Sx SUBTRACTING VALUES : +.Dl sysrc cloned_interfaces-=gif0 +.Ss Inline shell parameter expansion +Return $hostname up to, but not including, first +.Ql \&. : +.Dl sysrc 'hostname%%.*' .Pp -.Nm -\&'network_interfaces%%[$IFS]*' -.Dl returns first word of $network_interfaces . +Return first word of $network_interfaces: +.Dl sysrc 'network_interfaces%%[$IFS]*' .Pp -.Nm -\&'ntpdate_flags##*[$IFS]' -.Dl returns last word of $ntpdate_flags (time server address) . +Return last word of $ntpdate_flags +.Pq time server address : +.Dl sysrc 'ntpdate_flags##*[$IFS]' .Pp -.Nm -usbd_flags-"default" -.Dl returns $usbd_flags or "default" if unset or NULL . +Return $usbd_flags or +.Dq default +if unset or NULL: +.Dl sysrc usbd_flags-"default" .Pp -.Nm -cloned_interfaces+"alternate" -.Dl returns "alternate" if $cloned_interfaces is set . +Return +.Dq alternate +if $cloned_interfaces is set: +.Dl sysrc cloned_interfaces+"alternate" .Sh SEE ALSO .Xr rc.conf 5 , .Xr jail 8 , |
