dragonfly.git
4 years agoworld/kernel: Use the rounddown2() macro in various places.
Sascha Wildner [Wed, 23 Oct 2019 18:09:23 +0000 (20:09 +0200)]
world/kernel: Use the rounddown2() macro in various places.

Tested-by: zrj
4 years agoworld/kernel: Use the rounddown() macro in various places.
Sascha Wildner [Wed, 23 Oct 2019 18:09:05 +0000 (20:09 +0200)]
world/kernel: Use the rounddown() macro in various places.

Tested-by: zrj
4 years agoworld/kernel: Use the roundup2() macro in various places.
Sascha Wildner [Wed, 23 Oct 2019 18:08:40 +0000 (20:08 +0200)]
world/kernel: Use the roundup2() macro in various places.

Tested-by: zrj
4 years agosys/vfs/msdosfs: msdosfs_read()/msdosfs_write() fixes
Tomohiro Kusumi [Wed, 23 Oct 2019 15:50:09 +0000 (00:50 +0900)]
sys/vfs/msdosfs: msdosfs_read()/msdosfs_write() fixes

bits from freebsd/freebsd@7fe18219e6aee76fd67b0019f4271f895994aa01

but keep uio sanity checks removed by this commit in FreeBSD.

4 years agosys/vfs/msdosfs: Fix comments in msdosfs_setattr()
Tomohiro Kusumi [Wed, 23 Oct 2019 15:37:18 +0000 (00:37 +0900)]
sys/vfs/msdosfs: Fix comments in msdosfs_setattr()

from freebsd/freebsd@c2333909d4119b0b11bb182ddf4c177bc903d19e

4 years agosys/vfs/msdosfs: Fix style bugs
Tomohiro Kusumi [Wed, 23 Oct 2019 15:30:18 +0000 (00:30 +0900)]
sys/vfs/msdosfs: Fix style bugs

from freebsd/freebsd@fa70acb379635c7b16c8acb3ca68939e65d77434

4 years agosys/vfs/msdosfs: Don't sync update on msdosfs_setattr()
Tomohiro Kusumi [Wed, 23 Oct 2019 15:12:02 +0000 (00:12 +0900)]
sys/vfs/msdosfs: Don't sync update on msdosfs_setattr()

from freebsd/freebsd@896bab2157a7e590750c85dff9cd3dc28f4c8ff9

Read above for details.

4 years ago<sys/signal.h>: Some more whitespace fixes.
Sascha Wildner [Wed, 23 Oct 2019 10:35:58 +0000 (12:35 +0200)]
<sys/signal.h>: Some more whitespace fixes.

4 years agosbin/fsck_hammer2: Fix invalid free(3) of PFS names
Tomohiro Kusumi [Wed, 23 Oct 2019 00:12:25 +0000 (09:12 +0900)]
sbin/fsck_hammer2: Fix invalid free(3) of PFS names

4 years agosbin/fsck_hammer2: Fix copying unterminated ondisk string
Tomohiro Kusumi [Wed, 23 Oct 2019 00:12:11 +0000 (09:12 +0900)]
sbin/fsck_hammer2: Fix copying unterminated ondisk string

4 years agosbin/fsck_hammer2: Sort PFS names to scan on -p
Tomohiro Kusumi [Tue, 22 Oct 2019 20:44:50 +0000 (05:44 +0900)]
sbin/fsck_hammer2: Sort PFS names to scan on -p

4 years agosys/vfs/msdosfs: uniqdosname() assumes 12 bytes char[]
Tomohiro Kusumi [Tue, 22 Oct 2019 19:56:34 +0000 (04:56 +0900)]
sys/vfs/msdosfs: uniqdosname() assumes 12 bytes char[]

from freebsd/freebsd@522790ec8013b64a66fe7410c116e018b63bb9b3

See uniqdosname() and unix2dosfn().

4 years agosys/vfs/msdosfs: Don't set DE_ACCESS on read if readonly mount
Tomohiro Kusumi [Tue, 22 Oct 2019 18:26:27 +0000 (03:26 +0900)]
sys/vfs/msdosfs: Don't set DE_ACCESS on read if readonly mount

from freebsd/freebsd@1b90da9ab8a3ec94fb70dbd7a4204352c038ddda

4 years agosys/vfs/msdosfs: Avoid loop after bread()
Tomohiro Kusumi [Tue, 22 Oct 2019 15:45:06 +0000 (00:45 +0900)]
sys/vfs/msdosfs: Avoid loop after bread()

from freebsd/freebsd@992424e04cb1bcbf73836635d42aeefd1bde73b9

4 years agosys/vfs/msdosfs: Rewrite msdosfs_readdir()
Tomohiro Kusumi [Mon, 21 Oct 2019 17:21:48 +0000 (02:21 +0900)]
sys/vfs/msdosfs: Rewrite msdosfs_readdir()

Don't make the entire function look different from FreeBSD when
vop_write_dirent() (since fc46f680a7 in 2005) is just a wrapper.
Revive dirent local variable to make it easier to sync with FreeBSD
changes, and sync with FreeBSD.

4 years agosys/vfs/msdosfs: Fix FAT32 dotdot dirent corruption
Tomohiro Kusumi [Mon, 21 Oct 2019 17:21:16 +0000 (02:21 +0900)]
sys/vfs/msdosfs: Fix FAT32 dotdot dirent corruption

from freebsd/freebsd@96b12145fb2d0521fe7cd4e58d4691a3cf2861ea

4 years agosys/kern: Add init_va_filerev()
Tomohiro Kusumi [Mon, 21 Oct 2019 17:20:51 +0000 (02:20 +0900)]
sys/kern: Add init_va_filerev()

from freebsd/freebsd@1912367ebb1a5029d72a6b3b028c32f0af41f0b5

Note that init_va_filerev() implementation is not same as FreeBSD.
The existing FAT code using long in union _qcvt was probably a bug.

4 years agosbin/fsck_hammer2: Minor fix/cleanup
Tomohiro Kusumi [Mon, 21 Oct 2019 17:20:18 +0000 (02:20 +0900)]
sbin/fsck_hammer2: Minor fix/cleanup

4 years ago<math.h>: Reduce namespace pollution.
Sascha Wildner [Tue, 22 Oct 2019 14:19:40 +0000 (16:19 +0200)]
<math.h>: Reduce namespace pollution.

4 years ago<signal.h>: Clean up the POSIX namespace a bit.
Sascha Wildner [Tue, 22 Oct 2019 14:19:04 +0000 (16:19 +0200)]
<signal.h>: Clean up the POSIX namespace a bit.

Put the previous and heavier includes into __BSD_VISIBLE because some
dports expect for example <sys/select.h> to come in along with <signal.h>,
none of which request a POSIX environment, though.

Thanks to zrj for testing it with a dports bulk build.

4 years ago<signal.h>/<sys/signal.h>: Fix whitespace.
Sascha Wildner [Mon, 3 Jun 2019 18:47:14 +0000 (20:47 +0200)]
<signal.h>/<sys/signal.h>: Fix whitespace.

4 years agosbin/fsck_hammer2: Allow -l to take multiple PFS names
Tomohiro Kusumi [Sun, 20 Oct 2019 18:30:07 +0000 (03:30 +0900)]
sbin/fsck_hammer2: Allow -l to take multiple PFS names

4 years agosbin/fsck_hammer2: Add -e to count empty blockrefs
Tomohiro Kusumi [Sun, 20 Oct 2019 17:29:47 +0000 (02:29 +0900)]
sbin/fsck_hammer2: Add -e to count empty blockrefs

Nothing interesting in seeing empty blockref statistics,
so make it ignore by default.

4 years agosbin/hammer2: #if0 unused structs
Tomohiro Kusumi [Sun, 20 Oct 2019 18:14:08 +0000 (03:14 +0900)]
sbin/hammer2: #if0 unused structs

added in 2012-2013 but never used.

4 years agokernel/hammer2: Remove -DSMP from Makefile. It is no longer needed.
Sascha Wildner [Sun, 20 Oct 2019 18:58:37 +0000 (20:58 +0200)]
kernel/hammer2: Remove -DSMP from Makefile. It is no longer needed.

Reported-by: zrj
4 years agosbin/hammer2: Fix error message format
Tomohiro Kusumi [Sun, 20 Oct 2019 16:10:41 +0000 (01:10 +0900)]
sbin/hammer2: Fix error message format

4 years agosbin/newfs_hammer2: Remove "m:" from getopt(3)
Tomohiro Kusumi [Sat, 19 Oct 2019 16:56:56 +0000 (01:56 +0900)]
sbin/newfs_hammer2: Remove "m:" from getopt(3)

No such option.

4 years agomq_open.2: Add <sys/types.h> in the SYNOPSIS for mode_t.
Sascha Wildner [Sat, 19 Oct 2019 17:19:50 +0000 (19:19 +0200)]
mq_open.2: Add <sys/types.h> in the SYNOPSIS for mode_t.

Strangely, while POSIX mentions the type for the mode argument when
using the O_CREAT flag, it does not require <mqueue.h> to define it.
We removed <sys/types.h> inclusion from <mqueue.h> recently and this
commit reflects that in the manual page.

4 years agofsck_hammer2.8: Sort SEE ALSO.
Sascha Wildner [Sat, 19 Oct 2019 17:16:40 +0000 (19:16 +0200)]
fsck_hammer2.8: Sort SEE ALSO.

4 years agosys/vfs/msdosfs: Drop nonexistent msdosfs_mountroot() prototype
Tomohiro Kusumi [Sat, 19 Oct 2019 15:40:32 +0000 (00:40 +0900)]
sys/vfs/msdosfs: Drop nonexistent msdosfs_mountroot() prototype

4 years agosys/vfs/msdosfs: Add nop MSDOSFS_LOCK_MP()
Tomohiro Kusumi [Sat, 19 Oct 2019 15:40:14 +0000 (00:40 +0900)]
sys/vfs/msdosfs: Add nop MSDOSFS_LOCK_MP()

sys/vfs/msdosfs isn't MPSAFE yet, but reduce diff against FreeBSD.

4 years agoFix some typos: enought -> enough
Sascha Wildner [Sat, 19 Oct 2019 12:15:38 +0000 (14:15 +0200)]
Fix some typos: enought -> enough

4 years agosysctl(8): Sync manual page and usage() with getopt().
Sascha Wildner [Fri, 18 Oct 2019 19:55:46 +0000 (21:55 +0200)]
sysctl(8): Sync manual page and usage() with getopt().

Reported-by: kworr
4 years agosbin/fsck_hammer2: Minor fixes on syscall retvals
Tomohiro Kusumi [Fri, 18 Oct 2019 15:55:18 +0000 (00:55 +0900)]
sbin/fsck_hammer2: Minor fixes on syscall retvals

4 years agosbin/fsck_hammer2: Make destroy.c update dirent blockref key
Tomohiro Kusumi [Fri, 18 Oct 2019 15:55:00 +0000 (00:55 +0900)]
sbin/fsck_hammer2: Make destroy.c update dirent blockref key

Reconstructed dirents can't be ls'd with or without this change.

4 years agosbin/fsck_hammer2: Add reconstruct.c to force reconstruct filesystem
Tomohiro Kusumi [Fri, 18 Oct 2019 15:54:43 +0000 (00:54 +0900)]
sbin/fsck_hammer2: Add reconstruct.c to force reconstruct filesystem

For testing.
This doesn't get compiled by Makefile.

Recursively reconstruct checksums if ondisk mismatch is found.
Note that this isn't for filesystem recovery.

4 years agoyacc(1): Remove unused define from the Makefile.
Sascha Wildner [Fri, 18 Oct 2019 12:29:38 +0000 (14:29 +0200)]
yacc(1): Remove unused define from the Makefile.

4 years agorrenumd(8): Check if YYDEBUG is really 1.
Sascha Wildner [Fri, 18 Oct 2019 12:20:28 +0000 (14:20 +0200)]
rrenumd(8): Check if YYDEBUG is really 1.

4 years agolibpcap: Remove unused -DYYBISON.
Sascha Wildner [Fri, 18 Oct 2019 08:05:46 +0000 (10:05 +0200)]
libpcap: Remove unused -DYYBISON.

4 years agofsid/calendar: Clean up #includes a bit.
Sascha Wildner [Fri, 18 Oct 2019 07:49:58 +0000 (09:49 +0200)]
fsid/calendar: Clean up #includes a bit.

We don't want <sys/types.h> and <sys/param.h> at the same time (see
style(9)).

4 years agolibpcap: Add scanner.h to CLEANFILES.
Sascha Wildner [Fri, 18 Oct 2019 07:41:59 +0000 (09:41 +0200)]
libpcap: Add scanner.h to CLEANFILES.

4 years agofsid(8): Add missing include for MAXPATHLEN.
zrj [Thu, 10 Oct 2019 13:51:29 +0000 (16:51 +0300)]
fsid(8): Add missing include for MAXPATHLEN.

 For upcoming <sys/uio.h> cleanup.

4 years agolibfsid(3): Add missing include for <vfs/ufs/fs.h>.
zrj [Thu, 10 Oct 2019 13:49:09 +0000 (16:49 +0300)]
libfsid(3): Add missing include for <vfs/ufs/fs.h>.

 For upcoming <sys/uio.h> cleanup.

4 years agolibc/net: Add missing include for timespec.
zrj [Thu, 10 Oct 2019 13:48:19 +0000 (16:48 +0300)]
libc/net: Add missing include for timespec.

 For upcoming <sys/uio.h> cleanup.

4 years agonscd(8): Add missing include for timespec.
zrj [Thu, 10 Oct 2019 13:47:17 +0000 (16:47 +0300)]
nscd(8): Add missing include for timespec.

 For upcoming <sys/uio.h> cleanup.

4 years agocalendar(1): Add missing include for MAXPATHLEN.
zrj [Thu, 10 Oct 2019 13:44:31 +0000 (16:44 +0300)]
calendar(1): Add missing include for MAXPATHLEN.

 For upcoming <sys/uio.h> cleanup.

4 years agosbin/fsck_hammer2: Use memmove(3) for overlapping regions
Tomohiro Kusumi [Thu, 17 Oct 2019 15:04:10 +0000 (00:04 +0900)]
sbin/fsck_hammer2: Use memmove(3) for overlapping regions

4 years agozlib: Add commented out line to Makefile for debug build.
Sascha Wildner [Thu, 17 Oct 2019 07:49:38 +0000 (09:49 +0200)]
zlib: Add commented out line to Makefile for debug build.

4 years agozlib: Adjust README.DRAGONFLY a bit more.
Sascha Wildner [Thu, 17 Oct 2019 07:12:32 +0000 (09:12 +0200)]
zlib: Adjust README.DRAGONFLY a bit more.

4 years agoAdjust local files for the zlib upgrade.
Sascha Wildner [Thu, 17 Oct 2019 07:07:29 +0000 (09:07 +0200)]
Adjust local files for the zlib upgrade.

4 years agoMerge branch 'vendor/ZLIB'
Sascha Wildner [Thu, 17 Oct 2019 07:06:41 +0000 (09:06 +0200)]
Merge branch 'vendor/ZLIB'

4 years agoUpdate zlib from 1.2.8 to 1.2.11 on the vendor branch. vendor/ZLIB
Sascha Wildner [Thu, 17 Oct 2019 07:06:12 +0000 (09:06 +0200)]
Update zlib from 1.2.8 to 1.2.11 on the vendor branch.

4 years agosbin/hammer2: Add hammer2_breftype_to_str()
Tomohiro Kusumi [Wed, 16 Oct 2019 22:50:44 +0000 (07:50 +0900)]
sbin/hammer2: Add hammer2_breftype_to_str()

4 years agosbin/fsck_hammer2: Correctly count HAMMER2_BREF_TYPE_EMPTY blockrefs
Tomohiro Kusumi [Wed, 16 Oct 2019 20:02:49 +0000 (05:02 +0900)]
sbin/fsck_hammer2: Correctly count HAMMER2_BREF_TYPE_EMPTY blockrefs

Without this, HAMMER2_BREF_TYPE_EMPTY is always shown as 0
when inode or indirect blockrefs can have empty slots.

4 years agosbin/hammer2: Add 'B' to sizetostr() result when < 1024/2
Tomohiro Kusumi [Wed, 16 Oct 2019 19:30:20 +0000 (04:30 +0900)]
sbin/hammer2: Add 'B' to sizetostr() result when < 1024/2

All other cases have trailing 'B' from "KB", "MB", etc,
so it's better to be shown as e.g. "0.00B" than "0.00".

4 years agoMerge branch 'vendor/DHCPCD'
Roy Marples [Wed, 16 Oct 2019 15:10:46 +0000 (16:10 +0100)]
Merge branch 'vendor/DHCPCD'

4 years agoImport dhcpcd-8.1.1 with the following changes:
Roy Marples [Wed, 16 Oct 2019 15:00:37 +0000 (16:00 +0100)]
Import dhcpcd-8.1.1 with the following changes:

 * IPv6: Fix a potential crash when learning interface addresses.
 * DHCP: Fix fallout from dhcpcd-8.1.0 for checksum calculation.

4 years agolibz/savecore: Move the local zopen() from libz to savecore(8).
Sascha Wildner [Wed, 16 Oct 2019 07:41:20 +0000 (09:41 +0200)]
libz/savecore: Move the local zopen() from libz to savecore(8).

It is its only consumer.

Cleanup libz's Versions.def and Symbol.map too. Nothing in dports
should be using that function from the library (else it's a bug).

While here, add a __DECONST() to fix for WARNS=6.

Discussed-with: zrj

4 years agolibusb/libz: Install *.pc files (for dports) using FILES and FILESDIR.
Sascha Wildner [Wed, 16 Oct 2019 07:01:03 +0000 (09:01 +0200)]
libusb/libz: Install *.pc files (for dports) using FILES and FILESDIR.

4 years agosbin/fsck_hammer2: Rollback if second write failed on destroying dirent
Tomohiro Kusumi [Tue, 15 Oct 2019 15:10:47 +0000 (00:10 +0900)]
sbin/fsck_hammer2: Rollback if second write failed on destroying dirent

4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Tue, 15 Oct 2019 07:12:46 +0000 (09:12 +0200)]
Update the pciconf(8) database.

October 12, 2019 snapshot from https://pci-ids.ucw.cz

4 years agosbin/fsck_hammer2: Make destroy.c support embedded dirent name
Tomohiro Kusumi [Mon, 14 Oct 2019 15:30:32 +0000 (00:30 +0900)]
sbin/fsck_hammer2: Make destroy.c support embedded dirent name

and other dirent related fixes and cleanups.

4 years agosbin/fsck_hammer2: Print indirect blockref data on failure if possible
Tomohiro Kusumi [Mon, 14 Oct 2019 15:30:16 +0000 (00:30 +0900)]
sbin/fsck_hammer2: Print indirect blockref data on failure if possible

4 years agotools/toeplitz: Provide NBBY fallback.
zrj [Wed, 9 Oct 2019 11:12:54 +0000 (14:12 +0300)]
tools/toeplitz: Provide NBBY fallback.

4 years ago<sys/types.h>: Move out NBBY definition to <sys/param.h>.
zrj [Wed, 9 Oct 2019 10:38:16 +0000 (13:38 +0300)]
<sys/types.h>: Move out NBBY definition to <sys/param.h>.

 It is a better place for it due to close proximity of macros using it.

4 years agorestore(8): Add include to common header.
zrj [Wed, 9 Oct 2019 10:37:50 +0000 (13:37 +0300)]
restore(8): Add include to common header.

 Just like sbin/dump/dump.h explicitly include <sys/param.h>.

4 years ago<sys/socket.h>: Use double underscore versions for types.
zrj [Wed, 9 Oct 2019 09:27:32 +0000 (12:27 +0300)]
<sys/socket.h>: Use double underscore versions for types.

 Change caddr_t to plain "char *".

 In preparations to remove <sys/types.h> dependency.

4 years agoAdd <machine/alignbytes.h>.
zrj [Wed, 9 Oct 2019 09:08:16 +0000 (12:08 +0300)]
Add <machine/alignbytes.h>.

 Refactor ALIGN* macros to fix issue in <sys/socket.h> after the
 _CMSG_ALIGN() macro was adjusted to use ALIGNBYTES definition.
 * Including <sys/param.h> would introduce major namespace pollution.
 * Use NetBSD variant of namespace friendly double underscore versions.
 * Instead of <machine/cdefs.h> put double underscore versions into self
   contained header to minimize header poisoning.
 * Provide __ALIGNPTR() macro to avoid visibility issues with uintptr_t.
 * Move out single underscore versions from <machine/param.h>.  Keep them
   for OpenBSD compat that declares them in <ARCH/_types.h>.
 * Make non underscored versions user overridable (just like NetBSD).
   This is useful for cases where different alignment is needed.

 Later on this new header can be adjusted to provide other alignment
 macros like: STACKALIGNBYTES, ALIGNED_POINTER etc.

In-discussion-with: swilder

4 years agosbin/fsck_hammer2: Add destroy.c to destroy ondisk inode/dirent
Tomohiro Kusumi [Sun, 13 Oct 2019 21:54:33 +0000 (06:54 +0900)]
sbin/fsck_hammer2: Add destroy.c to destroy ondisk inode/dirent

For testing.
This doesn't get compiled by Makefile.

4 years agosbin/fsck_hammer2: Print blockref data on failure if possible
Tomohiro Kusumi [Sun, 13 Oct 2019 21:54:08 +0000 (06:54 +0900)]
sbin/fsck_hammer2: Print blockref data on failure if possible

4 years agosbin/hammer2: Print dirent name length in "show"
Tomohiro Kusumi [Sun, 13 Oct 2019 21:53:54 +0000 (06:53 +0900)]
sbin/hammer2: Print dirent name length in "show"

4 years agosbin/hammer2: Minor "show"/"freemap" output format fix
Tomohiro Kusumi [Sun, 13 Oct 2019 21:53:34 +0000 (06:53 +0900)]
sbin/hammer2: Minor "show"/"freemap" output format fix

"show"/"freemap" output doesn't use comma, except for after meth=
and in clothing parenthesis of blockref data part.

Remove the first one.

4 years agoClean up the namespace of <mqueue.h> a bit.
Sascha Wildner [Sun, 13 Oct 2019 19:33:37 +0000 (21:33 +0200)]
Clean up the namespace of <mqueue.h> a bit.

Thanks to zrj for testing with a dports bulk build.

4 years agoworld/kernel: Use the powerof2() macro in various places.
Sascha Wildner [Sun, 13 Oct 2019 11:56:13 +0000 (13:56 +0200)]
world/kernel: Use the powerof2() macro in various places.

4 years agofsck(8): Remove useless POWEROF2() macro.
Sascha Wildner [Sun, 13 Oct 2019 11:55:53 +0000 (13:55 +0200)]
fsck(8): Remove useless POWEROF2() macro.

4 years agoworld/kernel: Use the howmany() macro in various places.
Sascha Wildner [Sun, 13 Oct 2019 10:38:50 +0000 (12:38 +0200)]
world/kernel: Use the howmany() macro in various places.

4 years agokernel/libc: Use CTL_SYSCTL_* names instead of magic numbers.
Sascha Wildner [Sun, 13 Oct 2019 07:45:43 +0000 (09:45 +0200)]
kernel/libc: Use CTL_SYSCTL_* names instead of magic numbers.

These are for internal sysctl operations.

Taken-from: FreeBSD

4 years agozic/zdump: Clean up Makefiles (remove unneeded stuff).
Sascha Wildner [Sat, 12 Oct 2019 22:25:22 +0000 (00:25 +0200)]
zic/zdump: Clean up Makefiles (remove unneeded stuff).

4 years agozic(8): Avoid -Wstringop-truncation warning.
Sascha Wildner [Sat, 12 Oct 2019 21:46:50 +0000 (23:46 +0200)]
zic(8): Avoid -Wstringop-truncation warning.

The tzh.tzh_magic holds 4 characters, while TZ_MAGIC == "TZif".
So use memcpy() to avoid the warning.

Originally-submitted-by: zrj
Also committed upstream independently, see
https://sourceware.org/ml/libc-alpha/2017-11/msg00375.html

4 years agousr.sbin/fstyp: Add XXX comments on HAMMER1/2 label
Tomohiro Kusumi [Sat, 12 Oct 2019 18:42:21 +0000 (03:42 +0900)]
usr.sbin/fstyp: Add XXX comments on HAMMER1/2 label

This only matters to -media mount of block devices.
Not sure about other filesystem labels in fstyp.

4 years agosys/vfs/msdosfs: Sync comments on cluster macros with FreeBSD
Tomohiro Kusumi [Sat, 12 Oct 2019 17:45:03 +0000 (02:45 +0900)]
sys/vfs/msdosfs: Sync comments on cluster macros with FreeBSD

Use a terminology "filesystem relative" instead of "device relative".
"device relative" is actually better, but the entire code use
"filesystem relative".

Other descriptions are obvious if one knows FAT ondisk format.
Reduce unneeded diffs against FreeBSD.

4 years agosys/vfs/msdosfs: Style bugs
Tomohiro Kusumi [Sat, 12 Oct 2019 17:20:03 +0000 (02:20 +0900)]
sys/vfs/msdosfs: Style bugs

from freebsd/freebsd@bc5f57144e97b8336002b57d7c7e60a86ba3b0d4

4 years agosys/vfs/msdosfs: Sync a comment on cdev_t with FreeBSD
Tomohiro Kusumi [Sat, 12 Oct 2019 14:19:38 +0000 (23:19 +0900)]
sys/vfs/msdosfs: Sync a comment on cdev_t with FreeBSD

from freebsd/freebsd@c3c76f8185fd7f9995646dc6cb44a1777d80eabb

DragonFly still uses `pmp->pm_dev` and it won't go away either,
but sync a comment anyway. Not important to specifically mention
this when the function also uses other pmp fields.

4 years agolibc/__errno_location: Fix indent.
Sascha Wildner [Sat, 12 Oct 2019 19:29:28 +0000 (21:29 +0200)]
libc/__errno_location: Fix indent.

4 years agosys/vfs/msdosfs: Fix detrunc() twice
Tomohiro Kusumi [Sat, 12 Oct 2019 11:32:54 +0000 (20:32 +0900)]
sys/vfs/msdosfs: Fix detrunc() twice

from freebsd/freebsd@df35e60f9f9e72d96903368cf6c933be6f3ff720
from freebsd/freebsd@36b72954109b4906ef75de661bfbd254fba1c011

Not sure about intention of the first commit (removes bzero for non
directory case), but the second commit basically brought back removed
code after 16 years.

DragonFly already had what FreeBSD has now (with difference in bread()
taking offset, etc) for not having synced for 16 years, so just sync
up other minor diffs.

4 years agosys/vfs/msdosfs: Fix a serious off by 1 for cluster bitmap
Tomohiro Kusumi [Fri, 11 Oct 2019 13:52:10 +0000 (22:52 +0900)]
sys/vfs/msdosfs: Fix a serious off by 1 for cluster bitmap

from freebsd/freebsd@4159786890522d187529c336eb6da4029f04a3e1

    Fixed a serious off by 1 error.  The cluster-in-use bitmap was overrun
    by 1 u_int if the number of clusters was 1 more than a multiple of
    (8 * sizeof(u_int)).  The bitmap is malloced and large (often huge), so
    fatal overrun probably only occurred if the number of clusters was 1
    more than 1 multiple of PAGE_SIZE/8.

4 years agosys/vfs/msdosfs: Use howmany()
Tomohiro Kusumi [Fri, 11 Oct 2019 13:51:47 +0000 (22:51 +0900)]
sys/vfs/msdosfs: Use howmany()

from freebsd/freebsd@fc01419148d065603607b1008d536431465f3bc3

4 years agodhcpcd: Update README.DRAGONFLY
Roy Marples [Fri, 11 Oct 2019 11:57:15 +0000 (12:57 +0100)]
dhcpcd: Update README.DRAGONFLY

4 years agoMerge branch 'vendor/DHCPCD'
Roy Marples [Fri, 11 Oct 2019 11:49:54 +0000 (12:49 +0100)]
Merge branch 'vendor/DHCPCD'

4 years agoImport dhcpcd-8.1.0 to vendor branch with the following changes:
Roy Marples [Fri, 11 Oct 2019 11:42:26 +0000 (12:42 +0100)]
Import dhcpcd-8.1.0 to vendor branch with the following changes:

 * Fix carrier status after a route socket overflow
 * Allow domain spaced options
 * DHCP: Allow not sending Force Renew Nonce or Reconf Accept
 * IPv4LL: Now passes Apple Bonjour test versions 1.4 and 1.5
 * ARP: Fix a typo and remove pragma (thus working with old gcc)
 * DHCP6: Fix a cosmetic issue with infinite leases
 * DHCP6: SLA 0 and Prefix Len 0 will now add a delegatd /64 address
 * Ignore some virtual interfaces such as Tap and Bridge by default
 * BPF: Move validation logic out of BPF and back into dhcpcd

4 years agolibc/utmp{,x}: Add some __unused.
Sascha Wildner [Thu, 10 Oct 2019 19:11:43 +0000 (21:11 +0200)]
libc/utmp{,x}: Add some __unused.

4 years agocorepower(4): Fix comments based on the Intel SDM.
Sascha Wildner [Thu, 10 Oct 2019 18:57:46 +0000 (20:57 +0200)]
corepower(4): Fix comments based on the Intel SDM.

4 years ago<machine/specialreg.h>: Fix whitespace.
Sascha Wildner [Thu, 10 Oct 2019 18:42:17 +0000 (20:42 +0200)]
<machine/specialreg.h>: Fix whitespace.

4 years agosys/vfs/msdosfs: Spelling fixes
Tomohiro Kusumi [Thu, 10 Oct 2019 14:48:48 +0000 (23:48 +0900)]
sys/vfs/msdosfs: Spelling fixes

bits from freebsd/freebsd@9ed8e933a363f67081dec54601b6262db2a57437

4 years agosys/vfs/msdosfs: Rename DOS_FILESIZE_MAX -> MSDOSFS_FILESIZE_MAX
Tomohiro Kusumi [Thu, 10 Oct 2019 14:12:04 +0000 (23:12 +0900)]
sys/vfs/msdosfs: Rename DOS_FILESIZE_MAX -> MSDOSFS_FILESIZE_MAX

from freebsd/freebsd@e6fd69815f99795031e72e899db2cfba63581fc4

4 years agocorepower(4): Add Coffee Lake support (numbers look reasonable at least).
Sascha Wildner [Thu, 10 Oct 2019 07:44:07 +0000 (09:44 +0200)]
corepower(4): Add Coffee Lake support (numbers look reasonable at least).

4 years agocorepower(4): Fix some Intel microarchitecture names in the comments.
Sascha Wildner [Thu, 10 Oct 2019 07:42:19 +0000 (09:42 +0200)]
corepower(4): Fix some Intel microarchitecture names in the comments.

4 years agoopenssh: Adjust README.DRAGONFLY for recent pam_ssh removal.
Sascha Wildner [Wed, 9 Oct 2019 19:57:53 +0000 (21:57 +0200)]
openssh: Adjust README.DRAGONFLY for recent pam_ssh removal.

4 years agodrm/linux: Add vmalloc_to_page()
François Tigeot [Wed, 9 Oct 2019 19:45:37 +0000 (21:45 +0200)]
drm/linux: Add vmalloc_to_page()

Obtained-from: FreeBSD

4 years ago{i915,radeon}kms.4: Really clean up the manual page naming situation.
Sascha Wildner [Wed, 9 Oct 2019 19:45:28 +0000 (21:45 +0200)]
{i915,radeon}kms.4: Really clean up the manual page naming situation.

Leave only i915.4 and radeon.4. The previous naming was a leftover from
when the modules were renamed but the manpage were not taken care of.

Remove *kms.4 and *drm.4 copies.