DragonFlyBSD/src e436662sbin/fsck_hammer2 test.c

sbin/fsck_hammer2: Fix destination FILE* in print_media()

Also show comp/check in string format.
DeltaFile
+6-4sbin/fsck_hammer2/test.c
+6-41 files

DragonFlyBSD/src cc8e70bsys/kern vfs_vnops.c vfs_syscalls.c, sys/sys file2.h

kern - Make lseek(2) generic

* Extend fileops with fo_seek function allowing pluggable lseek(2)
  implementations. Part of preparation for linux DMA-BUF compat API.

* Move current vnode lseek implementation into vnode and devfs fileops.
  Code is exactly the same in both, note about duplication added.

* Set remaining fileops to badfo_seek.

Mentored-By: dillon
DeltaFile
+64-1sys/kern/vfs_vnops.c
+61-1sys/vfs/devfs/devfs_vnops.c
+1-51sys/kern/vfs_syscalls.c
+8-1sys/kern/kern_descrip.c
+6-0sys/sys/file2.h
+2-1sys/kern/sys_mqueue.c
+142-555 files not shown
+152-5911 files

DragonFlyBSD/src c973322contrib/diffutils/lib vasnprintf.c regexec.c, contrib/diffutils/src diff3.c

world - Replace gnu diff, diff3, and sdiff with BSD versions

* Replace diff and diff3 with the OpenBSD diff and diff3,
  Replace sdiff with the FreeBSD sdiff,
  Remove the GNU diff, diff3, and sdiff

* Basic testing with dsynth bulk to ensure no significant compatibility
  disruptions.

Submitted-by: Tyler <tyler.clark at foxide.xyz>
DeltaFile
+0-5,621contrib/diffutils/lib/vasnprintf.c
+0-4,334contrib/diffutils/lib/regexec.c
+0-3,946contrib/diffutils/lib/regcomp.c
+0-1,789contrib/diffutils/src/diff3.c
+0-1,746contrib/diffutils/lib/regex_internal.c
+0-1,734gnu/usr.bin/diff/libdiffutils/config.h
+0-19,170257 files not shown
+5,328-66,284263 files

DragonFlyBSD/src 152bbefsbin/fsck_hammer2 test.c

sbin/fsck_hammer2: Remove unused voldata argument
DeltaFile
+68-103sbin/fsck_hammer2/test.c
+68-1031 files

DragonFlyBSD/src 167a410sbin/hammer2 cmd_debug.c

sbin/hammer2/cmd_debug.c: Refactor unreadable cmd_show()

0b7381572b131c74051832dc251604e7f77b5a54 added multi-volumes
support to cmd_show() (entry point of freemap,show,volhdr directives)
with minimum modification using goto, but the code has been not
so readable since then. Rewrite this entry point function.

The output is same except that "Volume %d header %d..."
by default (= when not showing volhdr or bref for all volumes)
appears before printing each volhdr or bref, rather than all
at once in the beginning.
DeltaFile
+67-72sbin/hammer2/cmd_debug.c
+67-721 files

DragonFlyBSD/src b87d88fsbin/hammer2 cmd_debug.c

sbin/hammer2/cmd_debug.c: Clear errno

otherwise affects next strtol(3) variant when no error.

strtol(3) says "If no conversion could be performed,
0 is returned and the global variable errno is set to EINVAL".
DeltaFile
+5-0sbin/hammer2/cmd_debug.c
+5-01 files

DragonFlyBSD/src 2c8c691sbin/fsck_hammer2 test.c, sbin/hammer2 cmd_debug.c print_inode.c

sys/vfs/hammer2: Change hammer2_inode_meta::target_type to unused84

No longer used or needed since
da0cdd33148ab3e3c227355de759c595c533841a in 2017.

target_type was only used for the initial hardlink design and
implementation, which is not how it works today.
DeltaFile
+1-1sys/vfs/hammer2/hammer2_disk.h
+0-2sbin/hammer2/cmd_debug.c
+0-1usr.sbin/makefs/hammer2.c
+0-1sbin/fsck_hammer2/test.c
+0-1sbin/hammer2/print_inode.c
+1-65 files

DragonFlyBSD/src 9443de1sys/vfs/hammer2 hammer2_disk.h

sys/vfs/hammer2: Remove obsolete comments for unused/reserved ondisk fields
DeltaFile
+5-5sys/vfs/hammer2/hammer2_disk.h
+5-51 files

DragonFlyBSD/src 1b4dc14libexec/rtld-elf/x86_64 reloc.c

rtld - Improve error reporting

* Prefix hex type values with 0x

* Include (%s) obj->path so the user has some idea which file is
  responsible for the error.

Requested-by: servik
DeltaFile
+4-4libexec/rtld-elf/x86_64/reloc.c
+4-41 files

DragonFlyBSD/src b4ddbe7usr.sbin/makefs/hammer2 hammer2_ondisk.c

usr.sbin/makefs/hammer2: Sync with recent userspace ondisk.c changes

8d1faa373c717ffa3d7dce83f48327742c966dad
c825a6c5bc23e72617bbb2bede9bfb99724bada0

usr.sbin/makefs/hammer2 has mostly same verifications in hammer2_ondisk.c.
DeltaFile
+24-12usr.sbin/makefs/hammer2/hammer2_ondisk.c
+24-121 files

DragonFlyBSD/src 831bf83sys/vfs/hammer2 hammer2_ondisk.c

sys/vfs/hammer2: Sync with recent userspace ondisk.c changes

8d1faa373c717ffa3d7dce83f48327742c966dad
c825a6c5bc23e72617bbb2bede9bfb99724bada0

sys/vfs/hammer2 has mostly same verifications in hammer2_ondisk.c.
DeltaFile
+24-12sys/vfs/hammer2/hammer2_ondisk.c
+24-121 files

DragonFlyBSD/src c825a6csbin/hammer2 ondisk.c

sbin/hammer2: Verify fstype UUID in hammer2_verify_volumes_common()

Its string form has to be HAMMER2_UUID_STRING.
Also move common volu_id check to hammer2_verify_volumes_common().
DeltaFile
+19-8sbin/hammer2/ondisk.c
+19-81 files

DragonFlyBSD/src 1a0f56esbin/hammer2 cmd_debug.c

sbin/hammer2/cmd_debug.c: Print volume id in "Volume header" message
DeltaFile
+4-3sbin/hammer2/cmd_debug.c
+4-31 files

DragonFlyBSD/src 8fbce03sbin/hammer2 cmd_debug.c

sbin/hammer2/cmd_debug.c: Don't use both XB and XiB in printf

These are the only ones print XiB with "XiB" in HAMMER2 commands.
DeltaFile
+9-9sbin/hammer2/cmd_debug.c
+9-91 files

DragonFlyBSD/src c4e275dlib/libfetch fetch.c

libfetch: don't include fragments in HTTP requests

Fragments are reserved for client-side processing, see
https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1

Also, some servers don't like to receive HTTP requests with fragments.

```
$ fetch 'https://dropbox.com/a/b'
fetch: https://dropbox.com/a/b: Not Found

$ fetch 'https://dropbox.com/a/b#'
fetch: https://dropbox.com/a/b#: Bad Request
```

Taken-from: https://github.com/freebsd/freebsd-src/commit/1af7d5f389536a2f391153513d95d92ffdf360e4
DeltaFile
+4-1lib/libfetch/fetch.c
+4-11 files

DragonFlyBSD/src 8d1faa3sbin/hammer2 ondisk.c, sbin/newfs_hammer2 mkfs_hammer2.c

sbin/newfs_hammer2: Fail if input size is < alignment size

If aligned size becomes 0, it should fail with an error message
before hammer2_install_volume().
e.g. If a regular file av[0] is 4MiB, size becomes 0 after aligned.

Also add same sanity in hammer2_verify_volumes_common().
vol->size == 0 passes 8MiB or 1GiB alignment sanity.
DeltaFile
+2-1sbin/newfs_hammer2/mkfs_hammer2.c
+2-0sbin/hammer2/ondisk.c
+4-12 files

DragonFlyBSD/src 94803e4sbin/newfs_hammer2 mkfs_hammer2.c

sbin/newfs_hammer2: Remove redundant inode.meta.name_xxx zero clears

Remove obsolete code from b33a7e92438b9c9fc915e7c432666385051369db in 2012.

suproot has a name "SUPROOT" in inode itself if not in dirent,
and name_len is initialized with a proper length right after this.
DeltaFile
+0-3sbin/newfs_hammer2/mkfs_hammer2.c
+0-31 files

DragonFlyBSD/src 2b0cb81usr.bin/dsynth mount.c

dsynth - Make dummy /usr/packages directory for pkg compatibility

* For the chroot, make /usr/packages for pkg compatibility.  Certain
  pkg related temporary files are created there for reasons unknown.
DeltaFile
+6-0usr.bin/dsynth/mount.c
+6-01 files

DragonFlyBSD/src 5af8357lib/libc/sys utimes.2 Makefile.inc, sys/kern vfs_syscalls.c

futimesat() - Add futimesat() legacy system call

* Add legacy call for FreeBSD compatibility
DeltaFile
+31-0sys/kern/vfs_syscalls.c
+11-1lib/libc/sys/utimes.2
+6-0sys/sys/sysproto.h
+4-0sys/sys/time.h
+2-1lib/libc/sys/Makefile.inc
+3-0lib/libc/sys/Symbol.map
+57-27 files not shown
+67-513 files

DragonFlyBSD/src 83e7061sys/kern sys_generic.c, sys/net/tap if_tap.c

poll - Fix events == 0 handling for TAP and TUN, fix console spam

* BSD poll() supports events == 0 representing a "HUP ONLY" event.
  Most of our devices properly support this but TAP and TUN did not.

  Fix TAP and TUN to support this feature.  This fixes openvpn()
  when operating under heavier loads.

* Fix console spam on non-debug kprintf()s by rate-limiting any
  such spam if it occurs.  If a device doe snot support poll()'s
  HUP ONLY feature, the loop deregistration path will be hit and
  generate a kprintf().  We don't want console spam to stall the
  cpu.
DeltaFile
+18-10sys/kern/sys_generic.c
+6-4sys/net/tap/if_tap.c
+4-2sys/net/tun/if_tun.c
+28-163 files

DragonFlyBSD/src 7569b84share/man/man5 wg.conf.5

wg.conf.5: Fix a typo (in-inline comments are *not* allowed)
DeltaFile
+2-2share/man/man5/wg.conf.5
+2-21 files

DragonFlyBSD/src 8506772share/man/man4 acpi.4, sys/dev/acpica acpi.c acpivar.h

acpi: Narrow workaround for broken interrupt settings

Commit ad52dd3206 ("Sync acpi_resource with FreeBSD") introduced a
workaround for some broken BIOSes that specified active-lo instead of
active-hi polarity for ISA IRQs for UARTs.  The workaround assumed that
edge-sensitive ISA IRQs on x86 should always be active-hi.  However,
some recent AMD systems actually use active-lo edge-sensitive ISA IRQs
(and not just for UARTs, but also for the keyboard and PS/2 mouse
devices) and the override causes interrupts to be dropped resulting in
boot time hangs, non-working keyboards, etc.

Add a hw.acpi.override_isa_irq_polarity tunable (readable as a sysctl
post-boot) to control this quirk.  It can be set to 1 to force enable
the override and 0 to disable it.  The log of FreeBSD-PR (see below)
mentions an Intel motherboard as the sample case, so default the
tunable to 1 on systems with an Intel CPU and 0 otherwise.

Special thanks to Matthias Lanter <freebsd at lanter-it.ch> for tracking
down boot time issues on recent AMD systems to mismatched interrupt

    [7 lines not shown]
DeltaFile
+21-0sys/dev/acpica/acpi.c
+12-0sys/dev/acpica/acpivar.h
+4-7sys/dev/acpica/acpi_resource.c
+7-1share/man/man4/acpi.4
+44-84 files

DragonFlyBSD/src a285bb0sys/bus/u4b/input ums.c

ums: fix incorrect mouse button reporting via evdev

when ums driver receives non-mouse HID report. This results in
unexpected button release event. Reuse existing sysmouse logic to
keep button pressed.

Taken-from: FreeBSD [1]

[1]: https://github.com/freebsd/freebsd-src/commit/d6888e211b07be79dd8de3145ac41b365f482ae8
DeltaFile
+3-2sys/bus/u4b/input/ums.c
+3-21 files

DragonFlyBSD/src 4a361a7sys/vfs/procfs procfs_vnops.c procfs_subr.c

vfs/procfs: Add kqueue support

This patch is mostly derived from tmpfs.

With kqueue support implemented, poll() now works with the files on this
pseudo filesystem.  For example, poll() would report POLLIN instead of
timing out, and this makes less(1) work correctly.

Reviewed-by: dillon
DeltaFile
+88-1sys/vfs/procfs/procfs_vnops.c
+4-0sys/vfs/procfs/procfs_subr.c
+92-12 files

DragonFlyBSD/src 7ced307sys/vfs/procfs procfs_vnops.c procfs_ctl.c

vfs/procfs: Whitespace and style fixes
DeltaFile
+110-111sys/vfs/procfs/procfs_vnops.c
+9-8sys/vfs/procfs/procfs_ctl.c
+5-5sys/vfs/procfs/procfs_status.c
+4-4sys/vfs/procfs/procfs_vfsops.c
+4-4sys/vfs/procfs/procfs_subr.c
+3-2sys/vfs/procfs/procfs_mem.c
+135-1346 files

DragonFlyBSD/src 3187ec2usr.bin/less defines.h Makefile

less(1): Regenerate defines.h and update Makefile
DeltaFile
+34-26usr.bin/less/defines.h
+1-1usr.bin/less/Makefile
+35-272 files

DragonFlyBSD/src 3fa190acontrib/less README.DRAGONFLY

contrib/less: Update README.DRAGONFLY
DeltaFile
+4-4contrib/less/README.DRAGONFLY
+4-41 files

DragonFlyBSD/src e0f238econtrib/less search.c screen.c

Merge branch 'vendor/LESS'
DeltaFile
+672-108contrib/less/search.c
+473-290contrib/less/screen.c
+329-201contrib/less/optfunc.c
+237-213contrib/less/output.c
+307-139contrib/less/line.c
+227-207contrib/less/filename.c
+2,245-1,15853 files not shown
+5,486-2,79759 files

DragonFlyBSD/src e433da3contrib/less search.c screen.c

vendor/less: upgrade from 643 to 661

See the NEWS file for the list of changes.
DeltaFile
+672-108contrib/less/search.c
+473-290contrib/less/screen.c
+329-201contrib/less/optfunc.c
+237-213contrib/less/output.c
+307-139contrib/less/line.c
+227-207contrib/less/filename.c
+2,245-1,15853 files not shown
+5,487-2,80059 files

DragonFlyBSD/src 31b0039etc/defaults rc.conf, share/man/man5 rc.conf.5

rc.conf: Add and document the missing root_rw_mount=YES

The 'root_rw_mount' variable was missing, and it caused the rc.d/root
script to always ignore the 'mount -u -o rw /' command.  Nevertheless,
the '/' root filesystem was still remounted to be 'rw' because the later
'mount -a' command, according to /etc/fstab.

With this 'root_rw_mount=YES' placed, the '/' entry should now be
optional in /etc/fstab because the '/' root filesystem can be correctly
remounted to be 'rw'.

Obtained-from: FreeBSD (commit 6e1b226)
Reported-by: robstinge (IRC)
DeltaFile
+14-1share/man/man5/rc.conf.5
+1-0etc/defaults/rc.conf
+15-12 files