]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 months agouart(4): add Sunrise Point UART controllers
Kyle Evans [Fri, 14 Apr 2023 14:52:48 +0000 (09:52 -0500)]
uart(4): add Sunrise Point UART controllers

Sponsored by: Zenith Electronics LLC
Sponsored by: Klara, Inc.

(cherry picked from commit d1b6271118188dd25a18f2372ab1d3004335ea3c)

15 months agoloader: comconsole: don't unconditionally wipe out hw.uart.console
Kyle Evans [Fri, 14 Apr 2023 04:41:22 +0000 (23:41 -0500)]
loader: comconsole: don't unconditionally wipe out hw.uart.console

It may be the case that we need to set hw.uart.console manually in some
scenarios that comconsole can't necessarily support.  Avoid clobbering
hw.uart.console unless we've actually selected comconsole so that one
could at least get kernel console output..

Discussed with: imp
Sponsored by: Zenith Electronics LLC
Sponsored by: Klara, Inc.

(cherry picked from commit ec671f4980437008b0119c6367816083e15fa503)

16 months agoumtx: allow to configure minimal timeout (in nanoseconds)
Konstantin Belousov [Sat, 15 Apr 2023 17:46:12 +0000 (20:46 +0300)]
umtx: allow to configure minimal timeout (in nanoseconds)

PR: 270785

(cherry picked from commit 93ca6ff2958cace3b7b883ed797ea6539881a6a2)

16 months agox86: initialize use_xsave once
Konstantin Belousov [Tue, 18 Apr 2023 15:50:26 +0000 (18:50 +0300)]
x86: initialize use_xsave once

(cherry picked from commit 617a11eab6337693eae9d160453adf1943ab6a37)

16 months agosyncer vnode: add VOP_GETWRITEMOUNT() definition explicitly
Konstantin Belousov [Sun, 16 Apr 2023 17:04:53 +0000 (20:04 +0300)]
syncer vnode: add VOP_GETWRITEMOUNT() definition explicitly

(cherry picked from commit 7aeea73e30789c8987fbfa52cde93bab577bbc09)

16 months agosync_vnode(): add assert to check vn_start_write() correctness
Konstantin Belousov [Sat, 15 Apr 2023 19:41:44 +0000 (22:41 +0300)]
sync_vnode(): add assert to check vn_start_write() correctness

(cherry picked from commit d8a096621bcf4539d0920eb0711d19fcb30c0576)

16 months agozfs: fix up EINVAL from getdirentries on .zfs
Mateusz Guzik [Thu, 20 Apr 2023 08:36:53 +0000 (08:36 +0000)]
zfs: fix up EINVAL from getdirentries on .zfs

PR: 270909
(cherry picked from commit 9c4e270822a3592bf122f9a8e4e815b4602329f1)

16 months agovfs cache: fix vfs.cache.stats.* name typos
Igor Ostapenko [Wed, 19 Apr 2023 17:12:25 +0000 (20:12 +0300)]
vfs cache: fix vfs.cache.stats.* name typos

Two vfs.cache.stats names are fixed:
- s/.dotdothis/.dotdothits/
- s/.posszaps/.poszaps/

Signed-off-by: Igor Ostapenko <pm@igoro.pro>
[mjg: massaged the header a little bit]
(cherry picked from commit 0e0c47ecd624da976bf7e1ff391cb4a00c76b200)

16 months agovmrun.sh: Fix a typo in usage()
Mateusz Piotrowski [Thu, 20 Apr 2023 12:43:57 +0000 (14:43 +0200)]
vmrun.sh: Fix a typo in usage()

MFC after: 3 days
Sponsored by: Klara Inc.

(cherry picked from commit 607bc91d90a34f4d75cb7738bf23bc4517cd327f)

16 months agozfs: merge openzfs/zfs@e25f9131d (zfs-2.1-release) into stable/13
Martin Matuska [Sun, 23 Apr 2023 10:12:49 +0000 (12:12 +0200)]
zfs: merge openzfs/zfs@e25f9131d (zfs-2.1-release) into stable/13

OpenZFS release 2.1.11

Notable upstream pull requeset merges:
  #13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() (reverted)
  #13758 Allow mounting snapshots in .zfs/snapshot as a regular user
  #13816 Fix a race condition in dsl_dataset_sync() when activating features
  #14039 Optimize microzaps
  #14196 Remove atomics from zh_refcount
  #14198 Switch dnode stats to wmsums
  #14199 Remove few pointer dereferences in dbuf_read()
  #14200 Micro-optimize zrl_remove()
  #14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
  #14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs
  #14317 Pack zrlock_t by 8 bytes
  #14402 Prefetch on deadlists merge
  #14418 Introduce minimal ZIL block commit delay
  #14448 Fix console progress reporting for recursive send
  #14454 Improve arc_read() error reporting
  #14502 Partially revert f806306ce0
         "Activate filesystem features only in syncing context"
  #14516 System-wide speculative prefetch limit
  #14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
  #14563 Optimize the is_l2cacheable functions
  #14573 Add missing increment to dsl_deadlist_move_bpobj()
  #14621 Colorize patchset
  #14639 FreeBSD: Remove extra arc_reduce_target_size() call
  #14641 Additional limits on hole reporting
  #14653 Update vdev state for spare vdev
  #14712 Fix "Add colored output to zfs list"
  #14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"

Obtained from: OpenZFS
OpenZFS tag: zfs-2.1.11
OpenZFS commit: e25f9131d679692704c11dc0c1df6d4585b70c35
Relnotes: yes

16 months agokern.mk: clang >= 16 already infers ELFv2 for powerpc64
Dimitry Andric [Thu, 20 Apr 2023 19:27:11 +0000 (21:27 +0200)]
kern.mk: clang >= 16 already infers ELFv2 for powerpc64

There is no need to pass -mabi=elfv2 explicitly anymore, and with clang
16 in fact results in a "unused argument" warning.

MFC after: 3 days

(cherry picked from commit 42140052765e05c83a3ea797dce3eaad94bc3733)

16 months agoprocctl: add state flags to PROC_REAP_GETPIDS reports
Val Packett [Sat, 15 Apr 2023 17:59:30 +0000 (14:59 -0300)]
procctl: add state flags to PROC_REAP_GETPIDS reports

(cherry picked from commit 77f0e198d9134b6ca2650d3a84d7db2d786ec0c0)

16 months agonet80211: Remove double words in source code comments
Gordon Bergling [Tue, 18 Apr 2023 05:11:43 +0000 (07:11 +0200)]
net80211: Remove double words in source code comments

- s/we we/we/

(cherry picked from commit 93e491481686bb392b36a01e1569069846cf5f7e)

16 months agolast(1): Remove double words in source code comments
Gordon Bergling [Tue, 18 Apr 2023 05:12:45 +0000 (07:12 +0200)]
last(1): Remove double words in source code comments

- s/on on/on/
- s/we we/we/

(cherry picked from commit 1190b82c2294762c77099fc52835d5d07b57e7a3)

16 months agostand: Remove a double word in a source code comment
Gordon Bergling [Thu, 20 Apr 2023 09:11:18 +0000 (11:11 +0200)]
stand: Remove a double word in a source code comment

- s/value value/value/

(cherry picked from commit 66095010d1f4e5ff4a7bc39020106103887a470e)

16 months agoichiic: use bool for one-bit wide bit-fields
Dimitry Andric [Tue, 18 Apr 2023 18:08:28 +0000 (20:08 +0200)]
ichiic: use bool for one-bit wide bit-fields

A one-bit wide bit-field can take only the values 0 and -1. Clang 16
introduced a warning that "implicit truncation from 'int' to a one-bit
wide bit-field changes value from 1 to -1". Fix by using c99 bool.

Reported by: Clang
Reviewed by: emaste, wulf
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39665

(cherry picked from commit 87f55ab0b46ad72efee11d1b64ec8f839bb013da)

16 months agobsnmp: make single bit bitfields unsigned to avoid clang 16 warning
Dimitry Andric [Mon, 17 Apr 2023 16:11:56 +0000 (18:11 +0200)]
bsnmp: make single bit bitfields unsigned to avoid clang 16 warning

Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in bsnmp's snmpd.h:

    contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            peer->input.stream = 1;
                               ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after: 3 days

(cherry picked from commit b740e02500ca248e1096cf745a17d2a8fcc44fed)

16 months agolibsa: make single bit bitfields unsigned to avoid clang 16 warning
Dimitry Andric [Mon, 17 Apr 2023 16:15:57 +0000 (18:15 +0200)]
libsa: make single bit bitfields unsigned to avoid clang 16 warning

Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in libsa's tftp.c:

    stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                                    h->islastblock = 1;     /* very short file */
                                                   ^ ~
    stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    h->islastblock = 1;     /* EOF */
                                   ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after: 3 days

(cherry picked from commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8)

16 months agounionfs.5: Use '.An -nosplit' in the AUTHORS section
Gordon Bergling [Wed, 19 Apr 2023 15:11:41 +0000 (17:11 +0200)]
unionfs.5: Use '.An -nosplit' in the AUTHORS section

Use '.An -nosplit' in the AUTHORS section to prevent line breaks.

(cherry picked from commit 409731e7d71358cda3d23d903607614c29680038)

16 months agomakefs: use unsigned and %u for rock_ridge_move_count
Ed Maste [Mon, 10 Apr 2023 22:53:53 +0000 (18:53 -0400)]
makefs: use unsigned and %u for rock_ridge_move_count

For diff reduction against NetBSD's makefs.  Based on NetBSD git mirror
commit 00991aee8248.

With this change our makefs cd9660 support should be in sync up to
NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace.").

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 10854bf51747c172e45e365995ccf42aef2ab470)

16 months agomakefs: remove unused variable
Ed Maste [Mon, 17 Apr 2023 12:12:27 +0000 (08:12 -0400)]
makefs: remove unused variable

Reported by: Clang
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 79ead0849707396cb2de0bab7e354fb099ea344e)

16 months agomakefs: remove unused cd9660 options
Ed Maste [Fri, 31 Mar 2023 12:52:22 +0000 (08:52 -0400)]
makefs: remove unused cd9660 options

Makefs defined "follow-symlinks" and "help" options, but they did
nothing.  Remove them.

Obtained from: OpenBSD a8f1645688c2
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c753f49f7006d28786c29dfbb5f838b494e2146f)

16 months agoEnable KERN_TLS by default in ARM64 GENERIC
Allan Jude [Thu, 28 Jan 2021 20:48:37 +0000 (20:48 +0000)]
Enable KERN_TLS by default in ARM64 GENERIC

PR: 270759
Sponsored-by: Ampere Computing
Submitted-by: Klara, Inc.

(cherry picked from commit f9322ff6efa508df8368e31e3c4880cff11b0e23)

16 months agosftp: avoid leaking path arg in calls to make_absolute_pwd_glob
Ed Maste [Thu, 3 Nov 2022 17:17:40 +0000 (13:17 -0400)]
sftp: avoid leaking path arg in calls to make_absolute_pwd_glob

As Coverity reports:
    Overwriting tmp in tmp = make_absolute_pwd_glob(tmp, remote_path)
    leaks the storage that tmp points to.

Consume the first arg in make_absolute_pwd_glob, and add xstrdup() to
the one case which did not assign to the same variable that was passed
in. With this change make_absolute() and make_absolute_pwd_glob() have
the same semantics with respect to freeing the input string.

This change was reported to OpenSSH in
https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-November/040497.html
[and was later adopted upstream].

Reported by: Coverity Scan
CID: 1500409
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37253

(cherry picked from commit 69c72a57af843267b220f8367c4cc7162a12d696)

16 months agobridge: Log MAC address port flapping
Zhenlei Huang [Fri, 7 Apr 2023 14:25:41 +0000 (22:25 +0800)]
bridge: Log MAC address port flapping

MAC flapping occurs when a bridge receives packets with the same source MAC
address on different member interfaces. The common reasons are:
 - user roams from one bridge port to another
 - user has wrong network setup, bridge loops e.g.
 - someone set duplicated ethernet address on his/her nic
 - some bad guy / virus / trojan send spoofed packets

if_bridge currently updates the bridge routing entry silently hence it is hard
to diagnose.

Emit logs when MAC address port flapping occurs to make it easier to diagnose.

Reviewed by: kp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D39375
Differential Revision: https://reviews.freebsd.org/D39542

(cherry picked from commit 2d3614fb132b1cb8efd1e0accdd0c98ce6893efa)
(cherry picked from commit 9af6f4268ac3cc8203f34c746d955b4405279099)

16 months agoprintf.9: Update the use example of the %D conversion specifier
Zhenlei Huang [Fri, 14 Apr 2023 10:08:56 +0000 (18:08 +0800)]
printf.9: Update the use example of the %D conversion specifier

The output of hexadecimal bytes are in lowercase. Update the example to
reflect the reality.

Reviewed by: gbe (manpages)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39543

(cherry picked from commit 722b7589cca704670c3c532bdd0f5d46675df085)

16 months agolagg(4): Correctly define some sysctl variables
Zhenlei Huang [Mon, 17 Apr 2023 10:24:35 +0000 (18:24 +0800)]
lagg(4): Correctly define some sysctl variables

939a050ad96c virtualized lagg(4), but the corresponding sysctl of some
virtualized global variables are not marked with CTLFLAG_VNET. A try to
operate on those variables via sysctl will effectively go to the 'master'
copies and the virtualized ones are not read or set accordingly. As a
side effect, on updating the 'master' copy, the virtualized global
variables of newly created vnets will have correct values.

PR: 270705
Reviewed by: kp
Fixes: 939a050ad96c Virtualize lagg(4) cloner
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39467

(cherry picked from commit 401f03445e4aa42960e337604560593c7096e589)

16 months agovnet: Fix a typo in a source code comment
Zhenlei Huang [Mon, 17 Apr 2023 10:24:35 +0000 (18:24 +0800)]
vnet: Fix a typo in a source code comment

- s/form/from/

MFC after: 3 days

(cherry picked from commit a7acce3491987c116e607697a4906807f4ea1c10)

16 months agomlx5ib(4): Mark driver knows net epoch
Zhenlei Huang [Wed, 5 Apr 2023 16:06:15 +0000 (00:06 +0800)]
mlx5ib(4): Mark driver knows net epoch

This driver has already been EPOCH(9) aware since e48813009c6a.

Reviewed by: hselasky
Tested by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D39406

(cherry picked from commit da4068c4e1a090915a1a763c0d9fa5dc5b80842c)

16 months agoinfiniband: Opt-in for net epoch
Zhenlei Huang [Wed, 5 Apr 2023 16:05:02 +0000 (00:05 +0800)]
infiniband: Opt-in for net epoch

This is counterpart to e87c4940156c, which did the same for ethernet.

Suggested by: hselasky
Reviewed by: hselasky, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D39405

(cherry picked from commit fc6c93b6a5cf14cbc099f550f745d63779499fec)

16 months agogrdc.6: Add an ENVIRONMENT section
Gordon Bergling [Sun, 16 Apr 2023 09:17:06 +0000 (11:17 +0200)]
grdc.6: Add an ENVIRONMENT section

- Add an ENVIRONMENT section

Obtained from: OpenBSD

(cherry picked from commit 991360ba49707b84889e5bfce49dfbf383088171)

16 months agomorse.6: Mention to standards in the SEE ALSO section
Gordon Bergling [Sun, 16 Apr 2023 09:46:09 +0000 (11:46 +0200)]
morse.6: Mention to standards in the SEE ALSO section

Mention ITU-T Recommendation F.1 and ITU-R M.1677-1
in the SEE ALSO section.

Obtained from: OpenBSD

(cherry picked from commit 82a036d86acaac75b1ff6d4f8b767bbb117694f1)

16 months agomount_nfs.8: Fix a mandoc warning
Gordon Bergling [Tue, 18 Apr 2023 07:14:20 +0000 (09:14 +0200)]
mount_nfs.8: Fix a mandoc warning

- sections out of conventional order: Sh IMPLEMENTATION NOTES

(cherry picked from commit c2a9d23736da3593bc7cc883f43d913188d79beb)

16 months agoamd64: fix PKRU and swapout interaction
Konstantin Belousov [Thu, 13 Apr 2023 11:37:35 +0000 (14:37 +0300)]
amd64: fix PKRU and swapout interaction

(cherry picked from commit 1e0e335b0f0dbae8ce49307377b23ef3673bd402)

16 months agotrpt: fix several bugs and add deprecation notice
Michael Tuexen [Thu, 20 Apr 2023 22:09:40 +0000 (00:09 +0200)]
trpt: fix several bugs and add deprecation notice

This patch fixes several bugs releated to trpt including
* the computation of the TCP payload bytes, in particular when
  TCP options are present or IPv4 is used.
* the logging of incoming and outgoing packets.
* the logging of timers, in particular add support for logging of
  the delayed ack timer.
Also add a deprecation note, since support for this utility has been
removed from the main branch. Therefore, this is a direct commit to
stable/13.

Reviewed by: cc, glebius, rrs
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D39436

16 months agopkill: tests: do a pass for case-sensitive conflicts
Kyle Evans [Mon, 20 Mar 2023 19:51:41 +0000 (14:51 -0500)]
pkill: tests: do a pass for case-sensitive conflicts

As in 76b6a59f9d30a5a39a5ed, encode upper-case flag tests with a leading
underbar to avoid collisions (thus, erroneously dirty git repos) on
case-sensitive filesystems.

PR: 270948
Sponsored by: Klara, Inc.

(cherry picked from commit 822057bfbbbcdb722a7ccd0e40d6b7e82b1d83f7)

16 months agoloader: lua: disable autoboot timer after password entry
Cyrus Rahman [Sun, 16 Apr 2023 02:30:41 +0000 (21:30 -0500)]
loader: lua: disable autoboot timer after password entry

In the lua loader, if one sets a password in loader.conf, the
autoboot_delay timer will start before the menu is displayed.  One can
interrupt the autoboot and bring up the menu by entering a keyboard
character before the timer expires.

If this is done a prompt for the password is displayed.  Entering the
password will bring up the menu, but the timer will again start and
another keyboard character must be entered or autoboot will abort the
menu and boot the system.

PR: 265472
Reviewed by: kevans
MFC after: 3 days

(cherry picked from commit 0ab68e9272b573becdb42edf2b4419cb7ab04707)

16 months agoloader: lua: unload the kernel when changing BEs
Cyrus Rahman [Sun, 16 Apr 2023 02:27:53 +0000 (21:27 -0500)]
loader: lua: unload the kernel when changing BEs

Usually the kernel is loaded later, but there are circumstances where it
could have been loaded earlier than changing BEs.  Unload anything that
is already there so that we know we're using artifacts from the proper
environment.

PR: 265471
Reviewed by: kevans
MFC after: 3 days

(cherry picked from commit d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c)

16 months agotty: Default to printing kernel stack traceback only on INVARIANT kernels
Warner Losh [Wed, 19 Apr 2023 19:32:45 +0000 (13:32 -0600)]
tty: Default to printing kernel stack traceback only on INVARIANT kernels

Change the default from printing a breif kernel thread stack informaton
back to omitting it for non-invariant kernels in response to
SIGINFO/^T. Full and brief stack support can be selected with the
kern.tty_info_kstacks sysctl.

MFC After: 2 weeks
Sponsored by: Netflix
Reviewed by: grembo, jhb
Differential Revision: https://reviews.freebsd.org/D35576

(cherry picked from commit b69996d1d5d08fd5009ac325ea8e8154efd01b33)

16 months agobridge: Try to make the GRAB_OUR_PACKETS macro a bit more readable
Mark Johnston [Wed, 5 Apr 2023 14:37:00 +0000 (10:37 -0400)]
bridge: Try to make the GRAB_OUR_PACKETS macro a bit more readable

- Let the compiler use constant folding to eliminate conditionals.
- Fix some inconsistent whitespace.

No functional change intended.

Reviewed by: zlei
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38410

(cherry picked from commit 82bbdde4ebc9deb30d3a05ddec4d76f0a88df881)

16 months agonetisr: Purge another reference to NETISR_EPAIR
Mark Johnston [Wed, 12 Apr 2023 14:27:00 +0000 (10:27 -0400)]
netisr: Purge another reference to NETISR_EPAIR

Fixes: 03276e338a1b ("netisr: Remove the now-unused NETISR_EPAIR queue index")
MFC after: 1 week

(cherry picked from commit b4f1582f3b62ca943a6009d7f08c938833bf70d5)

16 months agoTag zfs-2.1.11
Tony Hutter [Tue, 18 Apr 2023 18:44:34 +0000 (11:44 -0700)]
Tag zfs-2.1.11

META file and changelog updated.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
16 months agoValues printed by zpool-iostat(8) should be right-aligned
Low-power [Tue, 18 Apr 2023 18:34:41 +0000 (02:34 +0800)]
Values printed by zpool-iostat(8) should be right-aligned

This inappropriate left-alignment was introduced in 7bb7b1f.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: WHR <msl0000023508@gmail.com>
Closes #14751

16 months agoRevert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
Tony Hutter [Tue, 18 Apr 2023 15:41:52 +0000 (08:41 -0700)]
Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"

This reverts commit 4b3133e671b958fa2c915a4faf57812820124a7b.

Users identified this commit as a possible source of data
corruption:
https://github.com/openzfs/zfs/issues/14753

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Issue #14753
Closes #14761

16 months agocontrib: dracut: fix race with root=zfs:dset when necessities required
наб [Tue, 28 Mar 2023 20:49:50 +0000 (22:49 +0200)]
contrib: dracut: fix race with root=zfs:dset when necessities required

This had always worked in my testing, but a user on hardware reported
this to happen 100%, and I reproduced it once with cold VM host caches.

dracut-zfs-generator runs as a systemd generator, i.e. at Some
Relatively Early Time; if root= is a fixed dataset, it tries to
"solve [necessities] statically at generation time".

If by that point zfs-import.target hasn't popped (because the import is
taking a non-negligible amount of time for whatever reason), it'll see
no children for the root datase, and as such generate no mounts.

This has never had any right to work. No-one caught this earlier because
it's just that much more convenient to have root=zfs:AUTO, which orders
itself properly.

To fix this, always run zfs-nonroot-necessities.service;
this additionally simplifies the implementation by:
  * making BOOTFS from zfs-env-bootfs.service be the real, canonical,
    root dataset name, not just "whatever the first bootfs is",
    and only set it if we're ZFS-booting
  * zfs-{rollback,snapshot}-bootfs.service can use this instead of
    re-implementing it
  * having zfs-env-bootfs.service also set BOOTFSFLAGS
  * this means the sysroot.mount drop-in can be fixed text
  * zfs-nonroot-necessities.service can also be constant and always
    enabled, because it's conditioned on BOOTFS being set

There is no longer any code generated at run-time
(the sysroot.mount drop-in is an unavoidable gratuitous cp).

The flow of BOOTFS{,FLAGS} from zfs-env-bootfs.service to sysroot.mount
is not noted explicitly in dracut.zfs(7), because (a) at some point it's
just visual noise and (b) it's already ordered via d-p-m.s from z-i.t.

Backport-of: 3399a30ee02d0d31ba2d43d0ce0a2fd90d5c575d
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
16 months agoepair tests: test PCP tagged packets
Kristof Provost [Mon, 10 Apr 2023 10:55:10 +0000 (12:55 +0200)]
epair tests: test PCP tagged packets

PR: 270736
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39483

(cherry picked from commit d116b8430b90212e308fe9945038c7bd98edf1bc)

16 months agoif_epair: also remove vlan metadata from mbufs
Kristof Provost [Mon, 10 Apr 2023 11:02:55 +0000 (13:02 +0200)]
if_epair: also remove vlan metadata from mbufs

We already remove mbuf tags from packets transitting an if_epair, but we
didn't remove vlan metadata.
In certain configurations this could lead to unexpected vlan tags
turning up on the rx side.

PR: 270736
Reviewed by: markj
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39482

(cherry picked from commit c69ae8419734829404bdb47d694d105c85f9835e)

16 months agoarm: Remove a double word in a comment in setjmp
Gordon Bergling [Thu, 13 Apr 2023 18:37:25 +0000 (20:37 +0200)]
arm: Remove a double word in a comment in setjmp

- s/number number/number/

(cherry picked from commit 26713ad9cf18b6ecd37f862182c84c1e57aee091)

16 months agokern: remove a double word in a KASSERT in subr_trap
Gordon Bergling [Thu, 13 Apr 2023 18:03:37 +0000 (20:03 +0200)]
kern: remove a double word in a KASSERT in subr_trap

- s/with with/with/

(cherry picked from commit c159f76713d7c1cbfdfc0c81dd91a5483096cf6f)

16 months agotmpfs: MFC: unbreak module build outside of kernel build environment
Eugene Grosbein [Sat, 15 Apr 2023 04:00:03 +0000 (11:00 +0700)]
tmpfs: MFC: unbreak module build outside of kernel build environment

(cherry picked from commit 5ee1c90e50ce8832c79aa61c8c2bbb71bd097799)

16 months agoarm64: nexus code tidy-up
Mitchell Horne [Fri, 10 Feb 2023 14:26:53 +0000 (10:26 -0400)]
arm64: nexus code tidy-up

Make a pass at the various nexus implementations, fixing some very minor
style issues, obsolete comments, etc.

The method declaration section has become unwieldy in many respects.
Attempt to tame it by:
 - Using generated method typedefs
 - Grouping methods roughly by category, and then alphabetically.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D38495

(cherry picked from commit e582d4a2b09e679baae457b50c7270b4a9f501bf)

16 months agoarm: nexus code tidy-up
Mitchell Horne [Mon, 6 Feb 2023 15:57:33 +0000 (11:57 -0400)]
arm: nexus code tidy-up

Make a pass at the various nexus implementations, fixing some very minor
style issues, obsolete comments, etc.

The method declaration section has become unwieldy in many respects.
Attempt to tame it by:
 - Using generated method typedefs
 - Grouping methods roughly by category, and then alphabetically.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D38495

(cherry picked from commit c650e1949558c1993d7486859ad9804fd582129e)

16 months agopowerpc: nexus code tidy-up
Mitchell Horne [Fri, 10 Feb 2023 14:37:08 +0000 (10:37 -0400)]
powerpc: nexus code tidy-up

Make a pass at the various nexus implementations, fixing some very minor
style issues, obsolete comments, etc.

Update the top-level comment to be closer to other nexus
implementations.

The method declaration section has become unwieldy in many respects.
Attempt to tame it by:
 - Using generated method typedefs
 - Grouping methods roughly by category, and then alphabetically.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D38495

(cherry picked from commit c514686aa06a08a97df051a75da9ea7964a74fb0)

16 months agoriscv: nexus code tidy-up
Mitchell Horne [Mon, 6 Feb 2023 15:53:09 +0000 (11:53 -0400)]
riscv: nexus code tidy-up

Make a pass at the various nexus implementations, fixing some very minor
style issues, obsolete comments, etc.

The method declaration section has become unwieldy in many respects.
Attempt to tame it by:
 - Using generated method typedefs
 - Grouping methods roughly by category, and then alphabetically.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D38495

(cherry picked from commit abe3309e71b94527e937f034dd81ca7d6afdeb67)

16 months agox86: nexus code tidy-up
Mitchell Horne [Fri, 10 Feb 2023 14:52:38 +0000 (10:52 -0400)]
x86: nexus code tidy-up

Make a pass at the various nexus implementations, fixing some very minor
style issues, obsolete comments, etc.

The method declaration section has become unwieldy in many respects.
Attempt to tame it by:
 - Using generated method typedefs
 - Grouping methods roughly by category, and then alphabetically.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D38495

(cherry picked from commit 99bd5c1fe32272ce6e8d9b2d575b42dd94593b25)

16 months agoofwbus: only allow unit number zero
Mitchell Horne [Mon, 13 Feb 2023 17:44:03 +0000 (13:44 -0400)]
ofwbus: only allow unit number zero

ofwbus has always been the root of attachment for OFW/FDT platforms. It
may have simplebus children, but we expect only one instance of the
ofwbus driver, added directly by nexus. We may as well ensure this
remains the case.

Reviewed by: jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38493

(cherry picked from commit afca197f5240ce2c2c7abfe5c9fbc50ba55f178b)

16 months agoofwbus: remove arm64 ifdefs
Mitchell Horne [Mon, 13 Feb 2023 17:43:25 +0000 (13:43 -0400)]
ofwbus: remove arm64 ifdefs

Rather than using the DEVICE_IDENTIFY method, let's have other
ofwbus-using platforms add ofwbus0 explicitly in nexus, like arm64. This
gives them the same flexibility, e.g. if riscv starts supporting ACPI,
and cleans up the #ifdefs.

We were doing this already on riscv, but adjust the 'order' parameters.

Reviewed by: andrew, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38492

(cherry picked from commit 53d5e65eead0f713c5e256018d46edbec0a96c11)

16 months agoofwbus: remove handling of resources from ofwbus
Elliott Mitchell [Wed, 8 Feb 2023 20:17:03 +0000 (16:17 -0400)]
ofwbus: remove handling of resources from ofwbus

The architecture nexus should handle allocation and release of memory and
interrupts. This is to ensure that system-wide resources such as these
are available to all devices, not just children of ofwbus0.

On powerpc this moves the ownership of these resources up one level,
from ofwbus0 to nexus0. Other architectures already have the required
logic in their nexus implementation, so this eliminates the duplication
of resources. An implementation of nexus_adjust_resource() is added for
arm, arm64, and riscv.

As noted by ian@ in the review, resource handling was the main bit of
logic distinguishing ofwbus from simplebus. With some attention to
detail, it should be possible to merge the two in the future.

Co-authored by: mhorne
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D30554

(cherry picked from commit f9bdaab95ec469738fbfc1f0edd3e8c744b7f71f)

16 months agophysmem: add ram0 pseudo-driver
Mitchell Horne [Thu, 27 May 2021 14:27:40 +0000 (11:27 -0300)]
physmem: add ram0 pseudo-driver

Its purpose is to reserve all I/O space belonging to physical memory
from nexus, preventing it from being handed out by bus_alloc_resource()
to callers such as xenpv_alloc_physmem(), which looks for the first
available free range it can get. This mimics the existing pseudo-driver
on x86.

If needed, the device can be disabled with hint.ram.0.disabled="1" in
/boot/device.hints.

Reviewed by: imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D32343

(cherry picked from commit e6cf1a0826c9d7f229e41224ec7b783501636528)

16 months agoarm: add an interrupt rman to nexus
Mitchell Horne [Sun, 5 Dec 2021 15:27:50 +0000 (11:27 -0400)]
arm: add an interrupt rman to nexus

Allow the nexus bus to own and manage interrupt resources. Currently,
interrupt resources on this architecture are managed completely by
ofwbus, but it is desirable that system-wide memory and interrupt
resources be managed by the top-level bus.

This is a pre-requisite to moving this resource management out of
ofwbus.

Reviewed By: ian, Elliott Mitchell <ehem+freebsd@m5p.com>
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D32357

(cherry picked from commit 1d03c3578d05b011dc714ec0735a5783c421530b)

16 months agoofw: fix memory leak in ofwbus_attach()
Christos Margiolis [Mon, 10 Apr 2023 15:31:46 +0000 (15:31 +0000)]
ofw: fix memory leak in ofwbus_attach()

PR: 269509
Reported by: Jaroslaw Pelczar <jarek@jpelczar.com>
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38903

(cherry picked from commit 38594ff9c0c9568b5082ba3273103904a6afd38e)

16 months agoawk: errror on printf format strings lacking conversion specifier
Ed Maste [Fri, 14 Apr 2023 14:49:05 +0000 (10:49 -0400)]
awk: errror on printf format strings lacking conversion specifier

Reported by: phk
Reviewed by: imp, markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39573

(cherry picked from commit 5dbd073b045c8e98730c025a4acf2279be26c33e)

16 months agoiicbus(4): Use the existing CTLFLAG_RWTUN flag definition
Zhenlei Huang [Wed, 12 Apr 2023 04:20:38 +0000 (12:20 +0800)]
iicbus(4): Use the existing CTLFLAG_RWTUN flag definition

Use it when possible, instead of separated flags.

No functional change intended.

Reviewed by: hselasky, erj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39466

(cherry picked from commit deac4c7f0753841de8da4d7f37d7e49620b3bbb4)

16 months agobxe(4): Use CTLFLAG_RDTUN flag definition
Zhenlei Huang [Wed, 12 Apr 2023 04:20:38 +0000 (12:20 +0800)]
bxe(4): Use CTLFLAG_RDTUN flag definition

sysctl variables rx_budget and max_aggregation_size are read-only loader
tunable. Mark them with CTLFLAG_RD flag.

No functional change intended.

Reviewed by: hselasky, erj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39466

(cherry picked from commit 8bd9afe9e1821368f4bb0d39c8c6703bf5007fd1)

16 months agoice(4): Use the existing CTLFLAG_RWTUN flag definition
Zhenlei Huang [Wed, 12 Apr 2023 04:20:38 +0000 (12:20 +0800)]
ice(4): Use the existing CTLFLAG_RWTUN flag definition

Use it when possible, instead of separated flags.

No functional change intended.

Reviewed by: hselasky, erj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39466

(cherry picked from commit 5ff8018108278d06e024676c539e9f60f8189e83)

16 months agocam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions
Zhenlei Huang [Wed, 12 Apr 2023 04:20:38 +0000 (12:20 +0800)]
cam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions

Use them when possible, instead of separated flags.

No functional change intended.

Reviewed by: hselasky, erj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39466

(cherry picked from commit 69cb72b8728ba605d6cc8758480eca3fc6fd2ed6)

16 months agopowerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions
Zhenlei Huang [Wed, 12 Apr 2023 04:20:38 +0000 (12:20 +0800)]
powerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions

Use them when possible, instead of separated flags.

No functional change intended.

Reviewed by: hselasky, erj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39466

(cherry picked from commit dc1c5138c3255cc9004a3842001ed6c5db8f4ea3)

16 months agovimage.8: Remove a double word
Gordon Bergling [Thu, 13 Apr 2023 18:22:25 +0000 (20:22 +0200)]
vimage.8: Remove a double word

- s/are are/are/

(cherry picked from commit e0c2f93029850968712a4fb4ab3630579d8812d3)

16 months agofs/cd9660: add header include guards
Ed Maste [Thu, 30 Mar 2023 16:49:40 +0000 (12:49 -0400)]
fs/cd9660: add header include guards

Diff reduction against NetBSD files in sys/fs/cd9660/ and OpenBSD files
in usr.sbin/makefs/cd9660/.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit d33cdf16df52050102931ee3b37ce173e449c9c1)

16 months agollvm-objcopy: link man page as strip.1 when WITH_LLVM_BINUTILS is set
Ed Maste [Wed, 5 Apr 2023 15:07:14 +0000 (11:07 -0400)]
llvm-objcopy: link man page as strip.1 when WITH_LLVM_BINUTILS is set

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39429

(cherry picked from commit 5cb402cc89c01e0a1f18f8c6a4c7d9cfc10d26ab)

16 months agortld: fixes for handling of the grouped options
Konstantin Belousov [Thu, 13 Apr 2023 04:47:23 +0000 (07:47 +0300)]
rtld: fixes for handling of the grouped options

(cherry picked from commit 7cdfe51f30965a365e3e7c829396a56e2a7e5141)

16 months agopkru.3: fix markup
Konstantin Belousov [Fri, 14 Apr 2023 23:29:45 +0000 (02:29 +0300)]
pkru.3: fix markup

(cherry picked from commit dcc19c6701ea789ac109a132df032c61feacf9ea)

16 months agoRegen
Konstantin Belousov [Tue, 4 Apr 2023 13:24:11 +0000 (16:24 +0300)]
Regen

16 months agoChange kqueue1() to be compatible with NetBSD
Konstantin Belousov [Fri, 31 Mar 2023 22:31:41 +0000 (01:31 +0300)]
Change kqueue1() to be compatible with NetBSD

(cherry picked from commit 54579376c05e7a039cde5f424c641fa29348835f)

16 months agoRename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD
Konstantin Belousov [Fri, 31 Mar 2023 22:27:00 +0000 (01:27 +0300)]
Rename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD

(cherry picked from commit dac310248826c37b60306c1b25fb94c35802196d)

16 months agokqueue1(2): document
Konstantin Belousov [Sat, 25 Mar 2023 23:41:21 +0000 (01:41 +0200)]
kqueue1(2): document

(cherry picked from commit f2ec444be523d3d00808ff82a7c690c75defe953)

16 months agokqueue1(2): export the symbol from libc
Konstantin Belousov [Sat, 25 Mar 2023 23:40:39 +0000 (01:40 +0200)]
kqueue1(2): export the symbol from libc

(cherry picked from commit 375732cc6e462ca160654886f0411d2950768a8b)

16 months agoAdd kqueue1() syscall
Konstantin Belousov [Sat, 25 Mar 2023 23:39:02 +0000 (01:39 +0200)]
Add kqueue1() syscall

(cherry picked from commit 61194e9852e641d1533cd04a5679d6042ff975d3)

16 months agoDEBUG_VFS_LOCKS: restore diagnostic for the witness use case
Konstantin Belousov [Mon, 10 Apr 2023 08:52:43 +0000 (11:52 +0300)]
DEBUG_VFS_LOCKS: restore diagnostic for the witness use case

(cherry picked from commit c53e990b8d0444b5ad59ddb18742a71434e30ee2)

16 months agoAdd witness_is_owned(9)
Konstantin Belousov [Mon, 10 Apr 2023 15:54:58 +0000 (18:54 +0300)]
Add witness_is_owned(9)

(cherry picked from commit 75fc6f86c38807f1fb305c065c6affcf7617b029)

16 months agoDEBUG_VFS_LOCKS: use witness if available
Konstantin Belousov [Sat, 8 Apr 2023 06:15:00 +0000 (09:15 +0300)]
DEBUG_VFS_LOCKS: use witness if available

(cherry picked from commit 7b6fe2428a97921e8df882d0a24b87094c37b468)

16 months agoMerge commit 'd84e570b54961e8874bbd8de25635eb96be0977e'
Simon J. Gerraty [Tue, 21 Feb 2023 06:13:27 +0000 (22:13 -0800)]
Merge commit 'd84e570b54961e8874bbd8de25635eb96be0977e'

This unbreaks the build for WITH_BEARSSL=1 on stable/13.

(cherry picked from commit 9c474dc51b0b09ff81339caee6772e454dd470e4)

16 months agoMerge bearssl-20220418
Simon J. Gerraty [Mon, 18 Apr 2022 21:47:09 +0000 (14:47 -0700)]
Merge bearssl-20220418

Main change is a callback for checking validity period of certificates.

Merge commit 'f6acb9b9f81c96ae7c9592bee1bb89c4357cc3e5'

Add -DHAVE_BR_X509_TIME_CHECK to libsecureboot/Makefile.inc

(cherry picked from commit cc9e6590773dba57440750c124173ed531349a06)

16 months agoarcmsr(4): Fix reading buffer empty length error.
黃清隆 [Sat, 1 Apr 2023 05:43:43 +0000 (22:43 -0700)]
arcmsr(4): Fix reading buffer empty length error.

(cherry picked from commit 285d85f4f96bf3b5aecccad865a8855724241c32)

16 months agobsd-family-tree: add FreeBSD 13.2
Sergey A. Osokin [Tue, 11 Apr 2023 14:32:53 +0000 (10:32 -0400)]
bsd-family-tree: add FreeBSD 13.2

(cherry picked from commit eed92455e60016258277f395fddf6433f290c0ba)

16 months agobsd-family-tree: add OpenBSD 7.3
Sergey A. Osokin [Mon, 10 Apr 2023 22:12:29 +0000 (18:12 -0400)]
bsd-family-tree: add OpenBSD 7.3

(cherry picked from commit 7f8953991fac3dec6554298625d4692833bb2ab7)

16 months agomakefs: use %s and __func__ in printf messages
Ed Maste [Tue, 11 Apr 2023 15:19:06 +0000 (11:19 -0400)]
makefs: use %s and __func__ in printf messages

For diff reduction against NetBSD.

Obtained from: NetBSD 0c4125e1a19f
Sponsored by: The FreeBSD Foundation

(cherry picked from commit af7624ed314574d6da1eb45b9fddbd2ad503fea4)

16 months agomakefs: set the validation entry system type
Ed Maste [Thu, 30 Mar 2023 14:31:45 +0000 (10:31 -0400)]
makefs: set the validation entry system type

Obtained from: NetBSD c3cb4dcc9c43
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 22db5e5d03278471c46799016c177abf95f273cb)

16 months agomakefs: use size_t or ssize_t where appropriate
Ed Maste [Thu, 30 Mar 2023 02:04:16 +0000 (22:04 -0400)]
makefs: use size_t or ssize_t where appropriate

Obtained from: NetBSD af7bc97830ac

(cherry picked from commit 1d1ffa2efd2a54c435b7977dc1cfd21dce248671)

16 months agomakefs: simplify filename conversion handling
Ed Maste [Fri, 31 Mar 2023 13:05:52 +0000 (09:05 -0400)]
makefs: simplify filename conversion handling

Obtained from: OpenBSD 4095a2e01d18
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c02e6ca7c22aa340fb261233f4f9c4438fee301a)

16 months agomakefs: remove some unused cd9660 types and defines
Ed Maste [Thu, 30 Mar 2023 23:31:41 +0000 (19:31 -0400)]
makefs: remove some unused cd9660 types and defines

Obtained from: OpenBSD
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d73acb32d3343d14c29a995160c007aeadfa79f3)

16 months agomakefs: avoid uninitialized memory in root directory date
Ed Maste [Thu, 6 Apr 2023 16:53:00 +0000 (12:53 -0400)]
makefs: avoid uninitialized memory in root directory date

Move date setting into cd9660_populate_iso_dir_record so there is no
path that leaves it unset.

PR: 203531
Reported by: Thomas Schmitt <scdbackup@gmx.net>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39258

(cherry picked from commit 7bc4ccf3aea935dde8ffc3e7c287884e22f87646)

16 months agomakefs: remove CD9660MAXPATH #define
Ed Maste [Fri, 31 Mar 2023 16:57:15 +0000 (12:57 -0400)]
makefs: remove CD9660MAXPATH #define

It was used only in constructing the host path that contains file
content, which is not related to anything CD9660-specific.  PATH_MAX is
the appropriate limit.  See OpenBSD commit 299d8950f319.

Obtained from: OpenBSD
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2f11df63374d279238e4836125a81fa2c5234730)

16 months agomakefs: improve some cd9660 error messages
Ed Maste [Thu, 30 Mar 2023 23:36:37 +0000 (19:36 -0400)]
makefs: improve some cd9660 error messages

Obtained from: OpenBSD
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c6ed8694ac58c8b81a5e4944cb96c2fa19b6ca79)

16 months agomakefs: #define Apple Partition bits
Ed Maste [Thu, 30 Mar 2023 16:45:18 +0000 (12:45 -0400)]
makefs: #define Apple Partition bits

NetBSD defines these in sys/bootblock.h, which we don't have.  Add local
defintions in cd9660_eltorito.c (as OpenBSD did) to reduce diffs between
the three makefs implementations.

Obtained from: OpenBSD
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f0bef3d20eb6e28cf66a42c6d34fdfe80a784365)

16 months agomakefs: correct "filname" typo
Ed Maste [Thu, 30 Mar 2023 14:14:56 +0000 (10:14 -0400)]
makefs: correct "filname" typo

Obtained from: NetBSD cd9660.c r1.58

(cherry picked from commit efe6a1574ec0a1b41a5729a478c6243002da60c9)

16 months agomakefs: Whitespace cleanup to sync with NetBSD
Ed Maste [Thu, 30 Mar 2023 14:31:14 +0000 (10:31 -0400)]
makefs: Whitespace cleanup to sync with NetBSD

(cherry picked from commit 52c68e1625e418e384b6d2d118a22bc3e4529f64)

16 months agomakefs: remove vestigial '?' cases from top-level getopt(3) loop
Ed Maste [Thu, 30 Mar 2023 01:33:39 +0000 (21:33 -0400)]
makefs: remove vestigial '?' cases from top-level getopt(3) loop

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.

Obtained from: OpenBSD makefs.c 1.22

(cherry picked from commit cc4adc4c4e473d47b687d2ac2757157abd728c81)

16 months agomakefs: do not pass mode to open() call lacking O_CREAT
Ed Maste [Thu, 30 Mar 2023 01:42:44 +0000 (21:42 -0400)]
makefs: do not pass mode to open() call lacking O_CREAT

Obtained from: OpenBSD ffs.c 1.35

(cherry picked from commit 45e405603b7f4d33372f32c80453ab5cd0d8fdcf)

16 months agomakefs: spelling
Ed Maste [Thu, 30 Mar 2023 01:40:07 +0000 (21:40 -0400)]
makefs: spelling

Obtained from: OpenBSD msdosfs_fat.c 1.7

(cherry picked from commit 1fb7d2cf999e52e3682174d0c2f20cb3baf414f3)