Sascha Wildner [Sat, 26 Sep 2020 09:49:03 +0000 (11:49 +0200)]
libc: Hide some internal symbols.
Taken-from: FreeBSD
Krzysztof Piecuch [Fri, 11 Sep 2020 19:38:53 +0000 (19:38 +0000)]
test(1): sync with FreeBSD
* optimize operator lookup
* simplify the code by unifying op_num and op_type
* use NULL instead of 0
* update manpage
Taken-from: FreeBSD
Krzysztof Piecuch [Fri, 11 Sep 2020 19:42:31 +0000 (19:42 +0000)]
printf(1): sync with FreeBSD
* improve manpage
* output formatted data directly, instead of via asprintf
* fixes printf(1) ignoring width and precision in %b format.
Taken-from: FreeBSD
Krzysztof Piecuch [Fri, 11 Sep 2020 17:53:10 +0000 (17:53 +0000)]
kill(1): Don't kill pid -1 on overflow from strtol(3).
Port freebsd/freebsd@
908622a5632a1a9aa5dda2a1fc7ce9f0102f6327
Store the result in a proper long and then compare to the proper pid_t
for overflow so that no MD assumptions are made.
Taken-from: FreeBSD
Tomohiro Kusumi [Fri, 25 Sep 2020 14:45:08 +0000 (23:45 +0900)]
sbin/mount_hammer2: Mention @label mount when >1 mounts exist
The first one matched from pmp list is selected, and pmps are
tail-inserted to pmp list when hmp is allocated by scanning inodes
under sroot.
Tomohiro Kusumi [Wed, 23 Sep 2020 17:30:56 +0000 (02:30 +0900)]
sys/vfs/hammer2: Prevent write against mounted device
Use a most recently mounted mp for devvp->v_rdev->si_mountpoint.
All fs do this except that in HAMMER2 devvp and mp aren't 1:1.
Tomohiro Kusumi [Wed, 23 Sep 2020 13:35:29 +0000 (22:35 +0900)]
sbin/fsck_msdosfs: Fix an integer overflow on 32-bit platforms
Likely unrelated to DragonFly, but sync with FreeBSD anyway.
from freebsd/freebsd@
4b0089abdf36a27fda364b25e95706a0abfe6c3a
from freebsd/freebsd@
667eef4ac6396ffe2d705b401a2a09f60ab38fe7
Sascha Wildner [Tue, 22 Sep 2020 20:00:53 +0000 (22:00 +0200)]
pw(8): Use __unused instead of self-assignments.
Sascha Wildner [Tue, 22 Sep 2020 19:58:59 +0000 (21:58 +0200)]
libdmsg: Init a pointer that was used uninitialized in early error paths.
Sascha Wildner [Tue, 22 Sep 2020 19:56:14 +0000 (21:56 +0200)]
ftpd(8): Fix wrong buffer used in an snprintf()'s sizeof().
Sascha Wildner [Tue, 22 Sep 2020 19:53:46 +0000 (21:53 +0200)]
rwhod(8): Fix a for() loop that was incrementing twice.
Sascha Wildner [Mon, 21 Sep 2020 12:58:31 +0000 (14:58 +0200)]
kernel: Provide __udivti3() for intermediate 128-bit calculations.
The recent refactoring of sysclock_t from 32 to 64 bits added -lgcc
to the kernel for this purpose but this approach has a number of
issues:
* It prevents the kernel from linking with clang that does these
things differently.
* We don't generally want to link the kernel against any userspace
libraries. Even less if these are GPL licensed libraries.
So the best solution is to provide __udivti3() in the kernel, too.
The code of the __udivmodti4() function (of which __udivti3() is a
special case) was taken from an older LLVM/clang C runtime library
and is MIT licensed. I've added the (dual-)license and list of
contributors.
The commit also adds kernel specific _uint128_t and _int128_t
types. The choice of names is deliberate, in order to avoid
conflicting with internal types provided by compilers.
In-discussion-with: zrj
Tomohiro Kusumi [Sat, 19 Sep 2020 20:48:51 +0000 (05:48 +0900)]
sbin/newfs_hammer2: Fix wrong comments on blockrefs in sroot inode
newfs_hammer2 initially only used 1 blockref within sroot inode when
these were written in
b33a7e92438b9c9fc915e7c432666385051369db in 2012.
Tomohiro Kusumi [Sat, 19 Sep 2020 14:03:06 +0000 (23:03 +0900)]
sys/vfs/hammer2: Fix hammer2_get_vtype() for unsupported objtype
Also remove obsolete comments.
Sascha Wildner [Sat, 19 Sep 2020 09:32:24 +0000 (11:32 +0200)]
byacc: Update README.DRAGONFLY and config.h.
Sascha Wildner [Sat, 19 Sep 2020 09:31:31 +0000 (11:31 +0200)]
Merge branch 'vendor/BYACC'
Sascha Wildner [Sat, 19 Sep 2020 09:31:12 +0000 (11:31 +0200)]
Sascha Wildner [Sat, 19 Sep 2020 09:29:41 +0000 (11:29 +0200)]
Fix some more programs for newer byaccs.
Matthew Dillon [Fri, 18 Sep 2020 19:55:57 +0000 (12:55 -0700)]
inet6 - Fix panic after route purge
* When the codepath in nd6_timer_dispatch() purges an ia6, it
then continues on and tests content in the now dead structure,
resulting in a panic.
* Once an ia6 has been purged we continue the loop at the next
ia6 instead of falling through and doing more tests.
Reported-by: phma
Sascha Wildner [Fri, 18 Sep 2020 17:49:33 +0000 (19:49 +0200)]
Prepare a few programs for future byacc upgrades.
Conditionalize yylex() prototypes on byacc's patchlevel.
Never byacc provides a prototype for yylex() by default since some time
and this prevents any fallout related to that.
Tomohiro Kusumi [Wed, 16 Sep 2020 16:33:36 +0000 (01:33 +0900)]
sys/vfs/hammer2: Remove obsolete hammer2_devblk{radix,size}()
Remove these functions from 2013 as the comment implies.
Since physical blk size is always 64KiB, radix bits itself
in freemap class variable is redundant, but this commit just
removes two functions without functional changes.
Sascha Wildner [Thu, 17 Sep 2020 08:43:24 +0000 (10:43 +0200)]
hier.7: Mention /etc/calendar.
Antonio Huete Jimenez [Wed, 16 Sep 2020 00:04:57 +0000 (02:04 +0200)]
ftpd(8): Exit during authentication if an error occurs after chroot().
Taken-from: FreeBSD
Security: CVE-2020-7468
Sascha Wildner [Wed, 16 Sep 2020 00:05:04 +0000 (02:05 +0200)]
hack(6): Remove an unused header file.
Antonio Huete Jimenez [Tue, 15 Sep 2020 23:38:32 +0000 (01:38 +0200)]
usr.bin/xargs: Do not report SIGPIPE from children.
- Additionally, print the signal name if it's known,
otherwise just print the signal number. Before only
the signal number was being reported.
Reported-by: swildner@
Taken-from: OpenBSD
Antonio Huete Jimenez [Sun, 13 Sep 2020 14:54:04 +0000 (14:54 +0000)]
binutils227: Backport binutils commit
033bfb739b52
- In DPorts, lang/ghc 'configure' phase was failing with this message:
checking for ld.gold object merging bug (binutils 22266)... Abort trap
(core dumped) affected
configure: error: Linker is affected by binutils 22266 but couldn't find
another unaffected linker. Please set the SettingsMergeObjectsCommand
variable to a functional linker.
===> Script "configure" failed unexpectedly.
- https://lists.gnu.org/archive/html/bug-binutils/2017-11/msg00042.html
- https://gitlab.haskell.org/ghc/ghc/-/issues/14328
Tested-with: buildworld+buildkernel+full dsynth run.
--------
The fix for PR 19291 broke some other cases where -r is used with scripts,
as reported in PR 22266. The original fix for PR 22266 ended up breaking
many cases for REL targets, where the addends are stored in the section data,
and are not being adjusted properly.
The problem was basically that in a relocatable output file (ET_REL),
symbol values are supposed to be relative to the start address of their
section. Usually in a relocatable file, all sections start at 0, so the
failure to get this right is often irrelevant, but with a linker script,
we occasionally see an output section whose starting address is not 0,
and gold would occasionally write a symbol with its relocated value instead
of its section-relative value.
This patch reverts the recent fix for PR 22266 as well as my original fix
for PR 19291. The original fix moved the symbol value adjustment to
write_local_symbols, but neglected to undo a few places where the adjustment
was also being applied, resulting in an occasional double adjustment. The
more recent fix removed those other adjustments, but then failed to
re-account for the adjustment when rewriting the relocations on REL targets.
With the old attempts reverted, we now apply the symbol value adjustment to
the one case that had been missed (non-section symbols in merge sections).
But now we also need to account for the adjustment when rewriting the addends
for RELA relocations.
gold/
PR gold/19291
PR gold/22266
* object.cc (Sized_relobj_file::compute_final_local_value_internal):
Revert changes from 2017-11-08 patch. Adjust symbol value in
relocatable links for non-section symbols.
(Sized_relobj_file::compute_final_local_value): Revert changes from
2017-11-08 patch.
(Sized_relobj_file::do_finalize_local_symbols): Likewise.
(Sized_relobj_file::write_local_symbols): Revert changes from
2015-11-25 patch.
* object.h (Sized_relobj_file::compute_final_local_value_internal):
Revert changes from 2017-11-08 patch.
* powerpc.cc (Target_powerpc::relocate_relocs): Adjust addend for
relocatable links.
* target-reloc.h (relocate_relocs): Adjust addend for relocatable links.
* testsuite/pr22266_a.c (hello): New function.
* testsuite/pr22266_main.c (main): Add test for merge sections.
* testsuite/pr22266_script.t: Add rule for .rodata.
--------
Antonio Huete Jimenez [Sun, 13 Sep 2020 14:49:45 +0000 (14:49 +0000)]
binutils227: Backport binutils commit
333d0055f6f16
-------
Fix problems with -r.
The fix committed for PR gold/19291 ended up breaking other cases. The
commit added adjustment code to write_local_symbols, but in many cases
compute_final_local_value_internal had already subtracted the output
section's address. To fix this, all other adjustments are now removed, so
only the one in write_local_symbols is left.
gold/
PR gold/22266
* object.cc (Sized_relobj_file::compute_final_local_value_internal):
Drop relocatable parameter and stop adjusting output value based on
it.
(Sized_relobj_file::compute_final_local_value): Stop passing
relocatable to compute_final_local_value_internal.
(Sized_relobj_file::do_finalize_local_symbols): Ditto.
* object.h (Sized_relobj_file::compute_final_local_value_internal):
Drop relocatable parameter.
-------
Tomohiro Kusumi [Tue, 15 Sep 2020 16:00:22 +0000 (01:00 +0900)]
sbin/hammer2: Set error code if "grow" failed
Sascha Wildner [Tue, 15 Sep 2020 11:15:01 +0000 (13:15 +0200)]
Update the pciconf(8) database.
August 19, 2020 snapshot from https://pci-ids.ucw.cz
Aaron LI [Mon, 14 Sep 2020 13:53:33 +0000 (21:53 +0800)]
ecclesiastical.c: Fix comment error to easter()
Well, the comment of easter() was copied from orthodox_easter() but
forgot to update it.
Reported-by: Sascha Wildner
Aaron LI [Mon, 14 Sep 2020 13:52:02 +0000 (21:52 +0800)]
calendar.1: Fix a grammar mistake and avoid Pinyin symbols
Sascha Wildner [Sun, 13 Sep 2020 17:38:13 +0000 (19:38 +0200)]
mkcsmapper(1): Move yylex() declaration to the .y file.
Sascha Wildner [Sat, 12 Sep 2020 23:56:41 +0000 (01:56 +0200)]
mille(6): Remove local erasechar()/killchar() definitions.
This also reverts
f2a508fe031425cd16ce86e24837668eeffbc6f7 which is
no longer needed after this commit.
Tomohiro Kusumi [Sat, 12 Sep 2020 16:12:19 +0000 (01:12 +0900)]
sbin/newfs_hammer2: Remove -f in SYNOPSIS
7b2944d3f07cfec26f629f9ed161157b42a0af32 missed removal of -f in SYNOPSIS.
Sascha Wildner [Sat, 12 Sep 2020 09:10:36 +0000 (11:10 +0200)]
edk2: Sync our TianoCore EDK II headers with the edk2-stable202008 tag.
Daniel Fojt [Sat, 12 Sep 2020 07:43:41 +0000 (09:43 +0200)]
Upgrade libressl. 2/2
Update README.DRAGONFLY.
Daniel Fojt [Sat, 12 Sep 2020 07:40:26 +0000 (09:40 +0200)]
Upgrade libressl. 1/2
Merge branch 'vendor/LIBRESSL' into master.
Daniel Fojt [Fri, 11 Sep 2020 14:58:25 +0000 (16:58 +0200)]
vendor/libressl: upgrade from 3.1.3 to 3.1.4
Interoperability and bug fixes for the TLSv1.3 client:
* Improve client certificate selection to allow EC certificates
instead of only RSA certificates.
* Do not error out if a TLSv1.3 server requests an OCSP response as
part of a certificate request.
* Fix SSL_shutdown behavior to match the legacy stack. The previous
behaviour could cause a hang.
* Fix a memory leak and add a missing error check in the handling of
the key update message.
* Fix a memory leak in tls13_record_layer_set_traffic_key.
* Avoid calling freezero with a negative size if a server sends a
malformed plaintext of all zeroes.
* Ensure that only PSS may be used with RSA in TLSv1.3 in order
to avoid using PKCS1-based signatures.
* Add the P-521 curve to the list of curves supported by default
in the client.
Sascha Wildner [Fri, 11 Sep 2020 18:48:33 +0000 (20:48 +0200)]
<sys/cdefs.h>: Restore to original behavior for __{BEGIN,END}_DECLS.
Specifically, to how it was after
a1671b4d6c66bceb629394590c46c15be034d14e
until
07a9133651472164d0ff4a0b6ffd6ecec4f46b30. I messed it up a little in
the latter commit.
Add __{BEGIN,END}_PUBLIC_DECLS too.
Tomohiro Kusumi [Fri, 11 Sep 2020 18:40:46 +0000 (03:40 +0900)]
sys/vfs/hammer2: Remove unused hammer2_iod_invals sysctl
No longer used since
85b1f267a5c33386e0761edb93a486fce13e8e88 in 2017.
Tomohiro Kusumi [Fri, 11 Sep 2020 18:37:29 +0000 (03:37 +0900)]
sys/vfs/hammer2: Remove unused hammer2_chain_frees sysctl
Appeared in
7d565a4f16015b664e90560061ad7574c3e68737 in 2016,
but never used.
Tomohiro Kusumi [Fri, 11 Sep 2020 18:34:59 +0000 (03:34 +0900)]
sys/vfs/hammer2: Remove unused hammer2_inval_enable sysctl
No longer used since
85b1f267a5c33386e0761edb93a486fce13e8e88 in 2017.
François Tigeot [Fri, 11 Sep 2020 17:19:16 +0000 (19:19 +0200)]
drm/linux: Fix __test_and_set_bit()
Its arguments were inverted.
François Tigeot [Fri, 11 Sep 2020 17:12:37 +0000 (19:12 +0200)]
drm/linux: Add pagevec_space()
Obtained-from: OpenBSD
Matthew Dillon [Fri, 11 Sep 2020 16:31:18 +0000 (09:31 -0700)]
terminfo: drop repeat-character capability from 'xterm-new' (2)
* Drop all use cases, output is mis-generated in some situations
(LANG and LC_CTYPE envs both unset, vi (nvi) a file with 0x0000000
sequences in it).
Frankly, its beyond stupid to even implement ansi sequences that were
designed for an era of 1200 baud modems.
* Add comment describing why ansi+rep was removed.
Tomohiro Kusumi [Fri, 11 Sep 2020 15:18:20 +0000 (00:18 +0900)]
sbin/newfs_hammer2: Remove/fix obsolete stuff from HAMMER1
Remove unused -f option. HAMMER1 had this to force creation when
devices were smaller than expected, but HAMMER2 has no such limitation.
The man page also had incorrect description.
Fix incorrect code/description for -r option originally from HAMMER1.
Aaron LI [Fri, 11 Sep 2020 15:02:26 +0000 (23:02 +0800)]
calendar.1: Fix minor formatting issues
* Fix markup of the '-s' flag
* Use 'Cm' to itemize the values of the '-s' flag
* Use 'Rs' and 'Re' macros to format the reference book
* Update the usage text against the man page
Daniel Fojt [Fri, 11 Sep 2020 14:12:44 +0000 (16:12 +0200)]
terminfo: drop repeat-character capability from 'xterm-new'
Remove ANSI capability 'rep' from xterm-new entry as it's causing
misbehaviour (at least) in nvi2 editor from base.
Reported by: Matthew Dillon
Daniel Fojt [Thu, 10 Sep 2020 18:01:31 +0000 (20:01 +0200)]
terminfo: avoid alternate buffer in 'xterm-basic'
Remove smcup and rmcup capabilities from xterm-basic entry to avoid screen
content restoration upon leaving viewers and editors (like less, vi, etc).
Reported by: Peeter Must, Matthew Dillon
Sascha Wildner [Fri, 11 Sep 2020 10:27:34 +0000 (12:27 +0200)]
calendar(1): Define some days in Austria in relation to 'Advent' as well.
Sascha Wildner [Fri, 11 Sep 2020 06:15:00 +0000 (08:15 +0200)]
calendar(1): Define various German entries relative to "Advent".
Now that we have the special "Advent" day defined, we can make this
much better readable and unambiguous.
Matthew Dillon [Fri, 11 Sep 2020 04:11:15 +0000 (21:11 -0700)]
flex - Fix buildworld issue when compiling on older releases
* Conditionalize use of reallocarray() so flex can bootstrap during
a buildworld on an older release.
Tomohiro Kusumi [Thu, 10 Sep 2020 16:30:18 +0000 (01:30 +0900)]
sbin/newfs_hammer2: Fix comments/assert on 4MB segments
The 4MB segments exist at every 1GB (every level1 freemap),
not every 2GB "zone".
Tomohiro Kusumi [Thu, 10 Sep 2020 15:36:24 +0000 (00:36 +0900)]
sys/vfs/hammer2: Remove obsolete comments on volume headers
Some comments here from 2012 seem obsolete.
Tomohiro Kusumi [Thu, 10 Sep 2020 15:25:07 +0000 (00:25 +0900)]
sys/vfs/hammer2: Remove obsolete comments on hardlink
Hardlink in HAMMER2 is dirents which refer to the same inode#.
It was initially designed differently.
Sascha Wildner [Thu, 10 Sep 2020 17:18:39 +0000 (19:18 +0200)]
calendar(1): Remove Volkstrauertag. It's already in calendar.kirche.
Sascha Wildner [Thu, 10 Sep 2020 14:58:35 +0000 (16:58 +0200)]
calendar(1): Add three more commemoration days to the german calendar.
Sascha Wildner [Thu, 10 Sep 2020 04:02:11 +0000 (06:02 +0200)]
Sync tpm(4) with FreeBSD.
Adds TPM 2.0 support, mainly.
Tomohiro Kusumi [Wed, 9 Sep 2020 16:01:19 +0000 (01:01 +0900)]
sbin/newfs_hammer2: Assert inodes/volhdrs don't cross 64KB boundary
Assert they fit within a pbuf in addition to existing asserts.
Daniel Fojt [Tue, 8 Sep 2020 08:49:35 +0000 (10:49 +0200)]
Upgrade vi(1). 2/2
- update README.{DRAGONFLY,DELETED}
- adjust Makefile
- regenerate header files
Daniel Fojt [Wed, 9 Sep 2020 06:36:13 +0000 (08:36 +0200)]
Upgrade vi(1). 1/2
Merge branch 'vendor/NVI2' into master.
Daniel Fojt [Mon, 7 Sep 2020 17:33:17 +0000 (19:33 +0200)]
vendor/nvi2: upgrade from 2.1.3 to 2.2.0
Digest of notable changes from git commit messages:
- fix incompatible behaviour of T
- remove a needless NULL-checks before free()
- fix backward sentence deletion
- fix a few memory leaks and a double free
- prevent erroneous COLUMNS/LINES settings
- add Vim-style expandtab option
- align unprintable chars correctly
For complete "git log" see:
https://github.com/lichray/nvi2/commits/master
Tomohiro Kusumi [Tue, 8 Sep 2020 16:04:51 +0000 (01:04 +0900)]
sys/vfs/hammer2: Add () around HAMMER2_XOPMASK_* macros
Tomohiro Kusumi [Tue, 8 Sep 2020 15:44:04 +0000 (00:44 +0900)]
sys/vfs/hammer2: Change hammer2_bref_type_str() to take btype
struct hammer2_blockref isn't the only data structure with blockref type.
Tomohiro Kusumi [Tue, 8 Sep 2020 15:27:57 +0000 (00:27 +0900)]
sys/vfs/hammer2: Add hammer2_adjwritecounter()
Separate counters adjustment from HAMMER2 I/O code.
Tomohiro Kusumi [Tue, 8 Sep 2020 15:23:53 +0000 (00:23 +0900)]
sys/vfs/hammer2: Ignore HAMMER2_BREF_TYPE_EMPTY in dio_write_stats_update()
Same as
1de4fc15b2011a762e9001a3ad50d1a0e84e544f except this one
already ignored 0 (HAMMER2_BREF_TYPE_EMPTY).
Tomohiro Kusumi [Tue, 8 Sep 2020 15:12:05 +0000 (00:12 +0900)]
sys/vfs/hammer2: Make hammer2_iod_inode_* static
Antonio Huete Jimenez [Mon, 7 Sep 2020 23:30:44 +0000 (01:30 +0200)]
nrelease: Follow-up commit
10d767c30ac91
- In our release disk image, create /firstboot so that any
rc.d script using the KEYWORD firstboot can be run
exactly once at boot. Since the firstboot code assumes
a read-write root filesystem, do not add this file to
our ISO image.
Tomohiro Kusumi [Mon, 7 Sep 2020 16:30:11 +0000 (01:30 +0900)]
sys/vfs/hammer2: Implement missing errors in hammer2_err*_to_err*()
Add missing HAMMER2_ERROR_* compatible with errnos.
The existing conversions stay the same.
Roy Marples [Sun, 6 Sep 2020 16:15:23 +0000 (17:15 +0100)]
Update to dhcpcd-9.2.0 with the following changes:
* route: ensure IPv4LL routes come last in priority
* DHCP: fix many issues with extending the last lease
* privsep: don't read control group from config in privsep
* privsep: only the master process responds to signals
* privsep: use a socketpair for stderr/stdin rather than dupping /dev/null
* privsep: right limit stdin/stderr/stdout
* privsep: dumping a lease is now run in a sandbox
* options: check if kernel supports INET or INET6 before enabling default
* options: let clientid override a prior duid
* options: allow -1 to represent infinity for requested lease time
* dhcpcd: fix a crash initing a new interface after route overflow
Tomohiro Kusumi [Sun, 6 Sep 2020 16:13:10 +0000 (01:13 +0900)]
sys/vfs/hammer2: Remove unused HAMMER2_LOOKUP_ALLNODES
No longer used since
01d71aa5538cba09383737ddbea2fb05e1e75e78 in 2015.
Tomohiro Kusumi [Sun, 6 Sep 2020 15:28:40 +0000 (00:28 +0900)]
sys/vfs/hammer2: Remove unused HAMMER2_CHAIN_EMBEDDED
Appeared in
512beabd66d77a7cca8f73bf69030ffa90f0b9e3 in 2013,
but no longer used, only appears in KASSERT.
Tomohiro Kusumi [Sun, 6 Sep 2020 15:03:15 +0000 (00:03 +0900)]
sys/vfs/hammer2: Remove unused HAMMER2_CHAIN_FICTITIOUS
Appeared in
b93cc2e0815ec1ad6d6f8e60cc0becbdee247679 in 2015,
but never used.
Roy Marples [Sun, 6 Sep 2020 16:20:31 +0000 (17:20 +0100)]
dhcpcd: update README.DRAGONFLY
Roy Marples [Sun, 6 Sep 2020 16:17:50 +0000 (17:17 +0100)]
Merge branch 'vendor/DHCPCD'
Tomohiro Kusumi [Sat, 5 Sep 2020 18:14:17 +0000 (03:14 +0900)]
sys/vfs/hammer2: Remove #if0'd function hammer2_allocsize()
This is obsolete version of hammer2_getradix() which won't be used again.
Tomohiro Kusumi [Sat, 5 Sep 2020 18:02:24 +0000 (03:02 +0900)]
sys/vfs/hammer2: Ignore HAMMER2_BREF_TYPE_EMPTY in hammer2_adjreadcounter()
Sascha Wildner [Sun, 6 Sep 2020 11:12:08 +0000 (13:12 +0200)]
libm: Mark some functions hidden (syncs math_private.h with OpenBSD).
Sascha Wildner [Sun, 6 Sep 2020 11:06:37 +0000 (13:06 +0200)]
<sys/cdefs.h>: Add __{BEGIN,END}_HIDDEN_DECLS definitions and use them.
Remove local empty definitions of these macros in some Makefiles.
Thanks to zrj for testing with a full bulk build.
Taken-from: OpenBSD
Sascha Wildner [Sun, 6 Sep 2020 11:01:17 +0000 (13:01 +0200)]
<sys/cdefs.h>: Move __dso_{public,hidden} to the other visibility defs.
Sascha Wildner [Sun, 6 Sep 2020 10:58:30 +0000 (12:58 +0200)]
<sys/cdefs.h>: Untangle the __{BEGIN,END}_DECLS definitions a bit.
Mainly separate the defined(__cplusplus) and the __GNU_PREREQ__(4, 0)
parts.
Tomohiro Kusumi [Sat, 5 Sep 2020 12:34:07 +0000 (21:34 +0900)]
sys/vfs/hammer2: Fix function names in kprintf
Matthew Dillon [Fri, 4 Sep 2020 18:18:04 +0000 (11:18 -0700)]
world - Add /usr/projects maintenance to /usr/Makefile.
* Add /usr/projects maintenance to /usr/Makefile. This allows the
dragonfly projects repo to be pulled and maintained, if desired.
Aaron LI [Sun, 2 Aug 2020 14:17:59 +0000 (22:17 +0800)]
calendar(1): Rewrite to support Chinese & Julian calendars
I wanted to use Chinese calendar in the calendar(1) utility, so I started
working on it. The Chinese calendar is a lunisolar calendar and requires
calculations of Sun and Moon positions. Along the way of implementing the
Chinese calendar support, more and more parts of the old code has been
replaced. Now, the new calendar(1) code base has been mostly rewritten to
be more extensible to support multiple calendars. Although only the
Gregorian (the default), Chinese and Julian calendars are currently
supported, more calendars now becomes much easier to add.
Highlights:
* Support Chinese calendar
* Support Julian calendar
* More accurate Sun and Moon calculations
* More extensible
* More calendar files/entries and more accurate information
* Better code base
Major Changes:
* If no user's calendar file, default to '/etc/calendar/default'
* Search calendar files in '/etc/calendar', which allows to override the
calendar file in '/usr/share/calendar' in a system-wide way
* Add '-s' option to show information of Chinese/Julian calendar or
Sun/Moon
* Add '-H' option to specify the calendar home directory
* Add '-L' option to specify the location, which should be set to get
accurate Sun/Moon information
* Add '-T' option to specify the current time for Sun/Moon calculations
* Much Improved calendar file parser
* More clean man page
* More helpful error messages
* Some bug fixes and various cleanups
The new calendar algorithms are implemented by referring to this great
book:
Calendrical Calculations: The Ultimate Edition (4th Edition)
by Edward M. Reingold and Nachum Dershowitz.
Cambridge University Press, 2018.
ISBN:
9781107057623
More information about the development history of this calendar(1) utility
can be found in my GitHub repository:
https://github.com/liweitianux/ccalendar
Antonio Huete Jimenez [Thu, 3 Sep 2020 23:32:53 +0000 (01:32 +0200)]
Makefile.usr: Always use pkg-static
- Should help in between LibreSSL upgrades.
Tomohiro Kusumi [Thu, 3 Sep 2020 15:17:02 +0000 (00:17 +0900)]
sbin/newfs_hammer2: Fail if no free space left
stat[v]fs shows negative free space if newfs/mount'd with <0 free_space.
Tomohiro Kusumi [Thu, 3 Sep 2020 15:10:06 +0000 (00:10 +0900)]
sys/vfs/hammer2: Remove obsolete comments for hammer2_install_volume_header()
First two are implemented.
bread will fail for a small device with <4 volume headers (4 isn't mandatory).
Daniel Fojt [Thu, 3 Sep 2020 06:59:12 +0000 (08:59 +0200)]
kernel: avoid possible use-after-free in ipv6
Fix improper mbuf handling when processing IPv6 Hop-by-Hop options.
Taken from: FreeBSD (FreeBSD-SA-20:24.ipv6)
Matthew Dillon [Wed, 2 Sep 2020 20:00:56 +0000 (13:00 -0700)]
fdisk - Add storage expansion option
* Add the -x option to fdisk. This will expand the last valid
slice for an existing dos label to fit the storage.
fdisk will refuse to expand an EFI GPT label, use 'gpt expand ...'
instead.
Matthew Dillon [Wed, 2 Sep 2020 18:51:15 +0000 (11:51 -0700)]
gpt, disklabel64 - Add storage expansion options (2)
* Cleanup debugging printfs and improve messages.
Matthew Dillon [Wed, 2 Sep 2020 18:24:47 +0000 (11:24 -0700)]
gpt, disklabel64 - Add storage expansion options
* Add gpt expand directive. For example 'gpt expand /dev/da0' will
expand the gpt to fill /dev/da0. This allows the gpt to be enlarged
to fit a new, larger storage device or expanded storage and can be issued
on a live gpt if desired.
* Add disklabel64 -x and -xx features. This expands the disklabel to
fit the new enlarged slice that it resides in. If -xx is specified,
the last partition configured in the disklabel will also be enlarged.
* And we already have 'hammer2 growfs <mountpt>' to grow a live hammer2
filesystem to fit an enlarged partition.
Tomohiro Kusumi [Wed, 2 Sep 2020 16:10:07 +0000 (01:10 +0900)]
sys/vfs/hammer2: Remove unused HAMMER2_INODE_RENAME_INPROG
Appeared in
51bf8e9b90e371ed867e5fd82f8ad6fb74867b22 in 2013,
but never used.
Also fix obsolete comments for inode flags.
Tomohiro Kusumi [Wed, 2 Sep 2020 16:03:54 +0000 (01:03 +0900)]
sys/vfs/hammer2: Fix wrong comment for hammer2_inode_modify()
Sync with changes after
815e1c13cd185a8d3507c7d200b6f53a78b6a364 in 2015.
Tomohiro Kusumi [Wed, 2 Sep 2020 15:50:17 +0000 (00:50 +0900)]
sys/vfs/ext2fs: Cleanup empty lines (sync with FreeBSD)
from freebsd/freebsd@
db86a2fd1ccdf6fcdfe452f21d38a7f038b368a7
Tomohiro Kusumi [Wed, 2 Sep 2020 15:37:18 +0000 (00:37 +0900)]
sys/vfs/msdosfs: Cleanup empty lines (sync with FreeBSD)
from freebsd/freebsd@
db86a2fd1ccdf6fcdfe452f21d38a7f038b368a7
Tomohiro Kusumi [Wed, 2 Sep 2020 15:36:36 +0000 (00:36 +0900)]
sys/vfs/autofs: Cleanup empty lines (sync with FreeBSD)
from freebsd/freebsd@
db86a2fd1ccdf6fcdfe452f21d38a7f038b368a7
François Tigeot [Wed, 2 Sep 2020 08:10:08 +0000 (10:10 +0200)]
kernel: Fix LINT64 build after Linux RCU changes
Matthew Dillon [Tue, 1 Sep 2020 21:29:36 +0000 (14:29 -0700)]
hammer2 - Add HAMMER2IOC_GROWFS ioctl (2)
* Fix minor bug to not try to write volume headers beyond the new size.
Only applicable to H2 filesystems less than 8GB in size.
Matthew Dillon [Tue, 1 Sep 2020 21:25:19 +0000 (14:25 -0700)]
hammer2 - Implement 'growfs' directive
* Implement the 'growfs' directive, as in:
hammer2 growfs /mnt
* If you resize the partition a hammer2 filesystem resides on, you
can grow the filesystem into the partition via this command.
The hammer2 filesystem must be mounted to issue this command.
* Note that disklabel partitions can be made larger in-place, even
with the filesystem using the partition already mounted, as long
as the drive actually has room to spare.
Matthew Dillon [Tue, 1 Sep 2020 21:24:28 +0000 (14:24 -0700)]
hammer2 - Add HAMMER2IOC_GROWFS ioctl
* This ioctl allows a live filesystem to be resized into a partition
that has increased in size.