zrj [Sat, 1 Feb 2020 11:49:48 +0000 (13:49 +0200)]
xargs(1): Disable prompt support (-p) in btools.
Not needed and helps with bootstrapping on different OS.
zrj [Sat, 1 Feb 2020 11:48:37 +0000 (13:48 +0200)]
xargs(1): Add limit for args_max.
Current logic does not handle cases where args_max > int32_t limit.
zrj [Sat, 1 Feb 2020 11:46:01 +0000 (13:46 +0200)]
tr(1): Fix compilation on Linux hosts.
zrj [Sat, 1 Feb 2020 11:41:24 +0000 (13:41 +0200)]
dd(1): Allow to bootstrap on OpenBSD and glibc based systems.
Disable tape detection support (reduces host requirements).
Redirect siginfo to SIGUSR1 to match dd behavior on glibc systems.
zrj [Sat, 1 Feb 2020 11:36:03 +0000 (13:36 +0200)]
time(1): Disable -l support in btools.
This removes kinfo(3) requirement to bootstrap time(1) on OpenBSD.
zrj [Sat, 1 Feb 2020 11:30:14 +0000 (13:30 +0200)]
time(1): Install signal handle only if SIGINFO is available.
While there, adjust needed headers and remove few trailing whitespaces.
zrj [Sat, 1 Feb 2020 11:25:19 +0000 (13:25 +0200)]
wc(1): Install signal handler only if SIGINFO is available.
Allows to bootstrap on glibc based systems.
zrj [Sat, 1 Feb 2020 11:21:27 +0000 (13:21 +0200)]
tail(1): Disable -f and -F (follow) functionality in btools.
Allows to bootstrap on OpenBSD (no kevent support).
zrj [Sat, 1 Feb 2020 11:17:51 +0000 (13:17 +0200)]
patch(1): Check for _DIRENT_HAVE_D_NAMLEN availability.
zrj [Sat, 1 Feb 2020 11:16:43 +0000 (13:16 +0200)]
sh(1): Check for _DIRENT_HAVE_D_NAMLEN availability.
To allow bootstrapping on OpenBSD.
zrj [Sat, 1 Feb 2020 11:15:11 +0000 (13:15 +0200)]
strfile(8): Include <stdint.h> explicitly.
zrj [Sat, 1 Feb 2020 11:13:45 +0000 (13:13 +0200)]
libc/citrus: Include <stdint.h> explicitly.
zrj [Sat, 1 Feb 2020 11:11:26 +0000 (13:11 +0200)]
localedef(1): Allow easier bootstrapping.
Solves issue when bootstrapping on OpenBSD.
zrj [Sat, 1 Feb 2020 11:07:44 +0000 (13:07 +0200)]
lorder(1): Use POSIX defined flags for sort(1).
While there, add -s to ensure stable sort (commonly available).
No functional change.
zrj [Sat, 1 Feb 2020 11:05:03 +0000 (13:05 +0200)]
world: Pass relative location of sys/ to newvers.sh as argument.
Location is known at invoke time and avoids issue where <osreldate.h>
might not be properly populated when building on OpenBSD host.
Sepherosa Ziehau [Fri, 31 Jan 2020 11:57:05 +0000 (19:57 +0800)]
taskqueue: Fix the order of TASKQUEUE_DEFINE_THREAD
So it can be used by drivers.
Sepherosa Ziehau [Fri, 31 Jan 2020 10:45:31 +0000 (18:45 +0800)]
sound/hda: Use driver specific taskqueue, instead of per-cpu taskqueue
This driver is not per-cpu ready, so don't user per-cpu taskqueue,
which causes assertion during taskqueue_enqueue. Instead use driver
specific taskqueue.
Sepherosa Ziehau [Fri, 31 Jan 2020 10:44:53 +0000 (18:44 +0800)]
taskqueue: Fix TASKQUEUE_DEFINE_THREAD
Matthew Dillon [Thu, 30 Jan 2020 23:40:01 +0000 (15:40 -0800)]
hammer2 - Fix inode & chain limits, improve flush pipeline.
* Reorganize VFS_MODIFYING() to avoid certain deadlock conditions and
adjust hammer2 to unconditionally stall in VFS_MODIFYING() when dirty
limits are exceeded.
Make sure VFS_MODIFYING() is called in all appropriate filesystem-
modifying paths.
This ensures that inode and chain structure allocation limits are
adhered to.
* Fix hammer2's wakeup code for the dirty inode count hystereis. This
fixes a situation where stalls due to excessive dirty inodes were waiting
a full second before resuming operation based on the dirty count
hysteresis.
The hysteresis now works as intended:
(1) Trigger a sync when the dirty count reache 50% N.
(2) Stall the frontend when the dirty count reaches 100% N.
(3) Resume the frontend when the diirty count drops to 66% N.
* Fix trigger_syncer() to guarantee that the syncer will flush the
filesystem ASAP when called. If the filesystem is already in a flush,
it will be flushed again.
Previously if the filesystem was already in a flush it would wait one
second before flushing again, which significantly reduces performance
under conditions where the dirty chain limit or the dirty inode limit is
constantly being hit (e.g. chown -R, etc).
Reported-by: tuxillo
Matthew Dillon [Wed, 29 Jan 2020 17:59:51 +0000 (09:59 -0800)]
kernel - Document UPREQ and EXREQ cases better
* Do a better job documenting responsibilities for UPREQ and EXREQ.
Antonio Huete Jimenez [Wed, 29 Jan 2020 16:52:50 +0000 (17:52 +0100)]
libfetch: Fix buffer overflow (CVE-2020-7450)
- A remote attacker, who can supply a malicious URL to the application
that uses libfetch(3), can trigger memory corruption and execute arbitrary
code on the target system.
- FreeBSD-SA-20:01.libfetch
Submitted-by: bapt, emaste
Sascha Wildner [Wed, 29 Jan 2020 16:46:49 +0000 (17:46 +0100)]
daemon(8): Sync with FreeBSD. Some ports need options we didn't have.
Mainly for -T, see https://github.com/DragonFlyBSD/DeltaPorts/issues/914
Most of the changes revolve around supporting logging the program's
output with syslog(3).
Reported-by: kworr
Taken-from: FreeBSD
Matthew Dillon [Tue, 28 Jan 2020 18:29:22 +0000 (10:29 -0800)]
dsynth - Hack elfinfo note output a bit
* The elf info is a bit of a hack and typically contains two
note structures, but only one has the version. The other typically
has zero for the version field.
* The structures in the .note section can sometimes be transposed,
so allow the case by testing to see if version is 0 and using the
second structure's version if it is.
Reported-by: Romick
Matthew Dillon [Mon, 27 Jan 2020 23:00:20 +0000 (15:00 -0800)]
lockmgr - Fix bug in lockmgr() cancel path
* Fix a bug in the lockmgr() cancel path where a cancelable blocked
exclusive lock is not canceled. The EXREQ2 bit must be tested in
addition to EXREQ, as it is possible for EXREQ to be clear when
EXREQ2 is set.
* Fixes a situation where the usb path could deadlock a softclock
cpu thread, causing a cascade of issues on that cpu.
Sascha Wildner [Mon, 27 Jan 2020 15:17:44 +0000 (16:17 +0100)]
kernel/atkbdc: Remove some dead code.
Sascha Wildner [Sun, 26 Jan 2020 19:14:32 +0000 (20:14 +0100)]
phantasia(6)/dsynth(1): Add two missing DPADD definitions.
Matthew Dillon [Sat, 25 Jan 2020 23:44:57 +0000 (15:44 -0800)]
libc - Check for invalid context in setcontext() and swapcontext()
* Check for an invalid context in setcontext() and swapcontext()
and return -1 instead of switching to the invalid context.
* This is not an exhaustive check but will handle invalid states set
by makecontext() if e.g. argc is messed up or the supplied stack is
too small. In particular, if makecontext() fails and set/swap tries
to switch to it, it will switch to the state from the getcontext()
prior to the makecontext() instead of to the desired makecontext()
state.
Reported-by: zrj, tuxillo
Sascha Wildner [Sat, 25 Jan 2020 20:41:40 +0000 (21:41 +0100)]
kernel/vga: Sort I/O port addresses in vgareg.h.
Sascha Wildner [Sat, 25 Jan 2020 01:03:49 +0000 (02:03 +0100)]
rc.d/root: Fix return code that I broke in November.
After
f304a32950ea980273aabeb3a194836fbb8471d2, the umount ended up
being the last command in root_start(), but it is expected to
return a non-zero status.
Fix this by inserting a return 0.
Sascha Wildner [Fri, 24 Jan 2020 22:17:24 +0000 (23:17 +0100)]
kernel/ntfs: Fix lockinit() flags.
Matthew Dillon [Fri, 24 Jan 2020 22:02:30 +0000 (14:02 -0800)]
kernel - Fix missing lock in devfs
* The master devfs lock must be held across a devfs_reference_ops()
call.
* Should fix races and panics related to fast device creation and
deletion (typically only triggered by dsynth's use of pty's).
Reported-by: zrj, multiple
François Tigeot [Fri, 24 Jan 2020 21:00:04 +0000 (22:00 +0100)]
drm: Fix lockinit() calls in previous commit
LK_EXCLUSIVE is a lockmgr() argument, not a lockinit() one.
François Tigeot [Fri, 24 Jan 2020 19:51:08 +0000 (20:51 +0100)]
drm: Replace all Linux spinlocks by lockmgr locks
* The DragonFly kernel can sleep in different circumstances than Linux
* Linux driver code has not been written to prevent it
* Make all Linux spinlock_t spinlocks lockmgr locks and avoid potential
problems once and for all
Peeter Must [Thu, 23 Jan 2020 08:43:48 +0000 (10:43 +0200)]
drm: Pass CRTC ID in userspace vblank events
* Add DRM_CAP_CRTC_IN_VBLANK_EVENT so userspace can
query the crtc field.
* This follows Linux's commit
5db06a8a98f515f67446a69c57577c4c363ec65d.
Sascha Wildner [Wed, 22 Jan 2020 19:41:37 +0000 (20:41 +0100)]
libutil: Fix some weird indentation.
Sascha Wildner [Wed, 22 Jan 2020 18:04:34 +0000 (19:04 +0100)]
mtest(8): Fix two -Wunused-parameter warnings and raise WARNS to 6.
Sascha Wildner [Wed, 22 Jan 2020 18:00:55 +0000 (19:00 +0100)]
ifmcstat(8): Fix a -Wshadow and raise WARNS to 6.
Sascha Wildner [Wed, 22 Jan 2020 17:33:10 +0000 (18:33 +0100)]
pflogd(8): Fix a duplicate prototype and raise WARNS to 6.
Sascha Wildner [Sun, 19 Jan 2020 10:59:28 +0000 (11:59 +0100)]
Local changes for the flex upgrade.
Sascha Wildner [Sun, 19 Jan 2020 10:25:39 +0000 (11:25 +0100)]
Merge branch 'vendor/FLEX'
Sascha Wildner [Sun, 19 Jan 2020 10:06:36 +0000 (11:06 +0100)]
Import flex-2.6.4 to the vendor branch.
Eitan Adler [Sat, 18 Jan 2020 22:29:44 +0000 (22:29 +0000)]
[fish] require the user have the card they ask for
This bug was introduced in
ef388479 by me.
Reported by: Matthew Kern <mkern@alconconstruction.com>
Matthew Dillon [Sat, 18 Jan 2020 17:49:45 +0000 (09:49 -0800)]
kernel - Fix indefinite wait buffer bug with encrypted disks
* Preallocate all (nmax) mpipe buffers to avoid doing any large buffer
allocations inside critical low-memory I/O paths.
* Remove the per-sector objcache, which could cause numerous blocking
memory allocations in critical low-memory I/O paths. Instead,
pre-allocate all necessary data outside of the critical path.
For now these per-sector structures are cached in a simple linked
list with a single spin-lock (not ideal).
* Reorganize per-sector data into its own essiv_ivgen_data structure,
Plus other minor cleanups.
* TODO - We need to queue the bio in the target_crypt_config structure
instead of relying on mpipe_alloc_callback() which must still allocate
a small structure via M_INTWAIT.
Reported-by: goleo, profmakx, daftaupe, others
Sascha Wildner [Sat, 18 Jan 2020 01:08:09 +0000 (02:08 +0100)]
rrenumd(8): Clean up the Makefile a bit wrt yacc(1) handling.
* Remove -d because it is default.
* Remove a target and CLEANFILES handling for y.tab.h, it is all
done in bsd.dep.mk.
* Add y.output to CLEANFILES when YACCDEBUG is specified.
Sascha Wildner [Sat, 18 Jan 2020 01:07:17 +0000 (02:07 +0100)]
iasl(8): Remove -d from YFLAGS, it is default.
Matthew Dillon [Fri, 17 Jan 2020 21:01:42 +0000 (13:01 -0800)]
kernel - Reduce mpipe overhead
* Reduce unnecessary wakeups when an asynchronous mpipe_thread is
employed. The thread was setting a flag that caused all disposals
to wake it up, even if it did not have any work.
Matthew Dillon [Fri, 17 Jan 2020 21:01:15 +0000 (13:01 -0800)]
kernel - Cleanup unused / redundant code
* Cleanup some unused and redundant code left over from older
works.
Sascha Wildner [Fri, 17 Jan 2020 15:19:58 +0000 (16:19 +0100)]
<sys/syslimits.h>: FWIW, use __GNUC_PREREQ__().
Matthew Dillon [Fri, 17 Jan 2020 04:39:12 +0000 (20:39 -0800)]
installer - Change default /build size
* /build was previously configured to use 1/3 of the drive,
but was capped at roughly 20GB. The cap doesn't really
scale well on modern systems, particularly since /usr/obj
and /var/crash are put on the /build partition.
* Remove the cap and change the configuration to use 1/4 of
the drive instead of 1/3.
* Also make a number of other minor adjustments to ensure that
space is not wasted in situations where swap and/or build
would be too small for auto-configuration.
Matthew Dillon [Fri, 17 Jan 2020 02:36:36 +0000 (18:36 -0800)]
libkvm - Fix 'ps' and 'fstat' on kernel cores
* Fix 'ps' and 'fstat' on kernel cores by fixing the broken
process list iteration code.
Matthew Dillon [Thu, 16 Jan 2020 06:25:18 +0000 (22:25 -0800)]
psm - Fix memory corruption and panic in psm driver
* Fix two locations where pb->inputbytes might not get reset to
0. The main problem appears to be in psmsoftintr() where
pb->inputbytes is not reset to 0 when mouse cases 'goto next',
do being before the next: label instead of after the label.
Reported-by: noob237
Matthew Dillon [Wed, 15 Jan 2020 20:07:19 +0000 (12:07 -0800)]
hammer2 - Update manual page
* Update manual page to clarify how media data overwrite mode works.
This is a long-standing feature in HAMMER2 that allows copy-on-write
to be disabled on a file-by-file basis when overwriting existing data.
Sepherosa Ziehau [Wed, 15 Jan 2020 13:23:53 +0000 (21:23 +0800)]
acpi/pstate: Be lenient about the invalid PPC.
If the PPC is invalid, just start from the first P-state, which
normally has the highest frequency.
Tomohiro Kusumi [Tue, 14 Jan 2020 14:34:12 +0000 (23:34 +0900)]
usr.sbin/fstyp: Remove redundant best_i check in HAMMER2
Bring in HAMMER2 fix from FreeBSD.
best_i will always be >= 0.
https://reviews.freebsd.org/D23159
from freebsd/freebsd@
bf17a6315052ebf1b19b547d422b9c204e840c66
Tomohiro Kusumi [Tue, 14 Jan 2020 14:30:09 +0000 (23:30 +0900)]
usr.sbin/fstyp: Use strlcpy(3) for HAMMER1
Bring in HAMMER1 fix from FreeBSD.
https://reviews.freebsd.org/D23159
from freebsd/freebsd@
1e63e28754df7b70eb0c3ba496fde0145c2c0aaa
Sascha Wildner [Mon, 13 Jan 2020 19:10:23 +0000 (20:10 +0100)]
Makefile.inc1: Add a missing '@' before an 'echo'.
Sascha Wildner [Mon, 13 Jan 2020 18:55:22 +0000 (19:55 +0100)]
yacc(1): Define GCC_PRINTFLIKE in the Makefile.
Sascha Wildner [Mon, 13 Jan 2020 18:27:36 +0000 (19:27 +0100)]
Sync ACPICA with Intel's version
20200110 (coming from
20190703).
* Allow more OwnerId's to prevent OWNER_ID_LIMIT exceptions.
* Return a Buffer object for all fields created via CreateField.
* Add AcpiDispatchGpe() function.
* Exit the interpreter before initializing objects within a newly
loaded table.
* Add new 'Fields' debugger command.
* Make AcpiLoadTable() return a table index and add AcpiUnloadTable().
* Fix acpinames(8) which was broken for some time.
* Added "Windows 2019" _OSI string.
* Various improvements to iasl(8).
* Fix some compilation warnings, fix missing ACPI_PRINTF_LIKE.
* Update copyrights to 2020.
For detailed list, please see sys/contrib/dev/acpica/changes.txt.
Tomohiro Kusumi [Mon, 13 Jan 2020 05:13:53 +0000 (14:13 +0900)]
sbin/fsck_msdosfs: Correct off-by-two issue when determining FAT type.
In the code we used NumClusters as the upper (non-inclusive) boundary
of valid cluster number, so the actual value was 2 (CLUST_FIRST) more
than the real number of clusters. This causes a FAT16 media with
65524 clusters be treated as FAT32 and might affect FAT12 media with
4084 clusters as well.
To fix this, we increment NumClusters by CLUST_FIRST after the type
determination.
from freebsd/freebsd@
27b822d4d61893d02ca0bc7163fa323331c497fe
Tomohiro Kusumi [Mon, 13 Jan 2020 05:01:53 +0000 (14:01 +0900)]
sbin/fsck_msdosfs: Apply typo fix from FreeBSD from NetBSD
from freebsd/freebsd@
77000233cce907a5633e0b086a58086767674566
Tomohiro Kusumi [Mon, 13 Jan 2020 05:01:07 +0000 (14:01 +0900)]
sbin/fsck_msdosfs: Require FAT to occupy at least one sector
from freebsd/freebsd@
d705f2ff45142d43945572e5ff53166ae1ead1e2
Tomohiro Kusumi [Mon, 13 Jan 2020 04:55:58 +0000 (13:55 +0900)]
sbin/fsck_msdosfs: Avoid mixing cluster numbers and sector numbers
Makes code more readable.
from freebsd/freebsd@
643521d9cba4f6b4717f042e6ce8bb0c71e5a3a0
Matthew Dillon [Mon, 13 Jan 2020 02:48:39 +0000 (18:48 -0800)]
dsynth - Fix prepare-system directive
* prepare-system was using 'pkg info -a -o' but this command does not
conveniently list the flavors of installed packages, resulting in
truncated origins and duplicates.
* Use a more complete 'pkg info -a -o -A' and parse the more sophisticated
output.
* If some of the top-level packages no longer exist in dports (a common
occurance), allow the user to choose to proceed with the build anyway.
Reported-by: xiwang
Sascha Wildner [Sun, 12 Jan 2020 08:08:37 +0000 (09:08 +0100)]
libc: Improve nslexer.c generation using FLAGS_GROUPS.
Flex detects YY_BUF_SIZE being defined since some time so there is
no need anymore to sed it in the source.
Sascha Wildner [Fri, 10 Jan 2020 21:40:14 +0000 (22:40 +0100)]
<sys/procctl.h>: Sync idtype_t comments with <sys/wait.h>.
Matthew Dillon [Fri, 10 Jan 2020 19:13:31 +0000 (11:13 -0800)]
kernel - Fix ip6_setpktoptions() panic
* Fix a panic in the control message processing for ipv6. The loop
could blow up if the last cmsg is not stored in an aligned number
of bytes.
Reported-by: tuxillo
François Tigeot [Thu, 9 Jan 2020 15:29:50 +0000 (16:29 +0100)]
drm/radeon: Use Linux memory-mapped IO functions
Partially sync driver code with Linux 4.9
François Tigeot [Thu, 9 Jan 2020 15:27:44 +0000 (16:27 +0100)]
drm/linux: Add readX() memory-mapped IO functions
They are meant to be used for accessing directly mapped device registers.
François Tigeot [Wed, 8 Jan 2020 16:21:51 +0000 (17:21 +0100)]
drm/linux: Add pci_free_consistent()
François Tigeot [Wed, 8 Jan 2020 10:41:20 +0000 (11:41 +0100)]
drm: Remove the gen-drm_pciids script
All drm drivers now directly use Linux PCI IDs descriptions
Matthew Dillon [Tue, 7 Jan 2020 19:15:45 +0000 (11:15 -0800)]
dsynth - Remove /etc/localtime from template
* Remove /etc/localtime from the template so all package builds
occur with the default (GMT I think).
* Fixes at least one broken package. Also so we are a little closer
to the synth environment which also does not populate /etc/localtime.
Recommend-by: zrj
Matthew Dillon [Tue, 7 Jan 2020 19:13:38 +0000 (11:13 -0800)]
vmstat - Pull ncpus from kmem/core-image
* Obtain ncpus from the specified kmem/core-image instead of
from the current system via sysctl.
zrj [Tue, 7 Jan 2020 08:50:44 +0000 (10:50 +0200)]
world: Introduce NO_INITRD option.
Sometimes it is useful to skip rebuilding initrd during development.
zrj [Tue, 7 Jan 2020 08:47:15 +0000 (10:47 +0200)]
share/zoneinfo: Do not hardcode zic(8) install flags.
Will be used for unpriv builds.
zrj [Tue, 7 Jan 2020 08:46:42 +0000 (10:46 +0200)]
share/terminfo: Use less generic variable name.
zrj [Tue, 7 Jan 2020 08:45:22 +0000 (10:45 +0200)]
Makefile: Use internal variable for setting PATH.
Mainly to prevent double override PATH when invoking submakes.
zrj [Tue, 7 Jan 2020 08:32:35 +0000 (10:32 +0200)]
Makefile.inc1: Remove id(1) from btools.
No longer required for buildworld/installworld.
zrj [Tue, 7 Jan 2020 08:31:18 +0000 (10:31 +0200)]
bsd.cpu.mk: Allow externally override host binutils.
Will be used from buildworld/buildkernel from OpenBSD hosts.
zrj [Tue, 7 Jan 2020 08:30:20 +0000 (10:30 +0200)]
kernel/kmod.mk: Do not hardcode awk path.
zrj [Tue, 7 Jan 2020 08:27:04 +0000 (10:27 +0200)]
kernel: Use relative paths for syscons fonts.
zrj [Tue, 7 Jan 2020 08:23:43 +0000 (10:23 +0200)]
kernel: Include syscons fonts in src-sys.tar.bz2 archive.
This will be used to reduce host dependencies when building
nativekernel from src-sys.tar.bz2. Building kernel without syscons
fonts is possible if SC_DFLT_FONT kernel options are not enabled.
zrj [Tue, 7 Jan 2020 18:25:48 +0000 (20:25 +0200)]
Merge branch 'vendor/GDB'
Conflicts:
contrib/binutils-2.25/ld/fdl.texi
contrib/gcc-4.7/gcc/doc/include/gpl_v3.texi
zrj [Tue, 7 Jan 2020 18:08:17 +0000 (20:08 +0200)]
Remove few unused texi sources on gdb branch.
As it was done in
874e15d007943a40fad40d5e25620e2bf00235a1
Matthew Dillon [Tue, 7 Jan 2020 05:23:29 +0000 (21:23 -0800)]
vmstat - Add verbose for -m
* If -m -v is specified all memory pools are dumped, even
if not in use.
Matthew Dillon [Mon, 6 Jan 2020 23:33:27 +0000 (15:33 -0800)]
libkvm - Fix minidump page table processing
* libkvm was not properly handling 1GB and 2MB page table entries.
These entries need to be masked against PG_PS_FRAME, not PG_FRAME.
* Fixes vmstat -m -N kernel -M vmcore output, and probably other
output too.
Matthew Dillon [Mon, 6 Jan 2020 18:05:35 +0000 (10:05 -0800)]
vmstat - Fix vmstat -m output
* The malloc_type structure's ks_use field is now a pointer
to a dynamically malloc()d array of ncpus, instead of a fixed
array of SMP_MAXCPU.
* Fixes segfault for vmstat -m output.
Matthew Dillon [Mon, 6 Jan 2020 18:04:35 +0000 (10:04 -0800)]
kernel - Fix bug in malloc_reinit_ncpus()
* malloc_reinit_ncpus() was not properly reinitializing the
last malloc_type in the linked list.
Matthew Dillon [Mon, 6 Jan 2020 08:27:52 +0000 (00:27 -0800)]
kernel - Change default vfs timestamp precision sec -> usec
* Change the default vfs.timestamp_precision setting from
seconds (0) to microseconds (2).
* Nanoseconds is more problematic because utimes() only has a
microsecond precision and cpu concurrency might cause some confusion.
So for now leave it set to microseconds.
Matthew Dillon [Mon, 6 Jan 2020 08:21:44 +0000 (00:21 -0800)]
cpdup - Bump version, add usec timestamp precision
* cpdup will now run utimes() with microsecond precision (the
most it can handle), if possible. It previously only used
seconds precision.
* Compatibilty with older cpdup's is maintained for remote copies
(though it will warn you of the version mismatch). Older cpdup's
only transfer the seconds field.
* cpdup still only uses the seconds field when comparing files,
in order to maintain maximum compatibility between operating systems
and filesystems.
Matthew Dillon [Mon, 6 Jan 2020 01:43:52 +0000 (17:43 -0800)]
dsynth - Enhance purge-distfiles directive
* Improve the distfiles list by using -VALLFILES instead of -VDISTFILES.
* Match up the related lock files so we can purge lock files that
are no longer relevant.
Sascha Wildner [Sun, 5 Jan 2020 10:22:06 +0000 (11:22 +0100)]
<time.h>: Check strptime()'s format argument with __strftimelike.
As the manual page says, "all conversion specifications are identical
to those described in strftime(3)."
Sascha Wildner [Sat, 4 Jan 2020 21:54:16 +0000 (22:54 +0100)]
basename.3/dirname.3: Adjust for recent commits.
Matthew Dillon [Sat, 4 Jan 2020 20:48:20 +0000 (12:48 -0800)]
libc - Adopt more linux-friendly basename() and dirname()
* Essentially take the FreeBSD basename() and dirname() code, changing
the API to be more linux-friendly. This reduces work required in dports.
* Adjust numerous cases in our base code that assumed the old prototypes
and side effects.
* The passed-in string pointers are no longer const and can be modified
in-place by the functions. The returned value is no longer sometimes
dynamically allocated and will instead either return a constant string,
a portion of the passed in string, or a modified portion of the
passed-in string.
The API unfortunately has to be declared to return a char * instead of
a const char *, even though it sometimes returns pointers to constant
strings.
The API is now thread-safe.
* The API is still a huge historical mess but at least the ports for
the most part assume the above behavior now due to linux doing the
same thing.
Reviewed-by: multiple people
Matthew Dillon [Sat, 4 Jan 2020 19:58:56 +0000 (11:58 -0800)]
drm - Fix workqueue bugs w/recent drm pushes
* The linux workqueue code uses pcpu queues in many situations.
At least one use-case in the recent drm code push can result in
taskqueue_enqueue() calls being issued on active tasks to a different
queue, causing (typically) overnight or idle related panics.
* Adjust the linux workqueue code to use the new taskqueue API
functions that supports this behavior.
Matthew Dillon [Sat, 4 Jan 2020 19:51:58 +0000 (11:51 -0800)]
kernel - Update taskq code
* Move the task_queue declaration out of struct timeout_task and
into struct task.
Generally speaking we want to transition to using the stored
queue instead of requiring it to be passed in every API call,
but we maintain API compatibility for now.
* Assert that the stored queue matches the passed-in queue
in several places.
* Add taskqueue_enqueue_optq(), an API function that allows the
queue a task is placed on to be changed. For example, when a
pcpu queue is passed-in.
If the task cannot be moved to the passed-in queue it will remain
on its current queue, otherwise it will be moved/added to the
passed-in queue. The queue the task is placed on is returned in
an indirect rgument.
* Add taskqueue_cancel_simple() and taskqueue_drain_simple().
These functions just take the task as an argument, the
queue does not need to be specified.
François Tigeot [Sat, 4 Jan 2020 09:50:09 +0000 (10:50 +0100)]
drm/radeon: Use pci_alloc_consistent()
Matthew Dillon [Sat, 4 Jan 2020 02:45:44 +0000 (18:45 -0800)]
dsynth - Don't prompt on purge-distfiles if no files to delete
* Don't ask whether we should delete 0 distfiles.
Requested-by: zrj
Matthew Dillon [Fri, 3 Jan 2020 19:54:58 +0000 (11:54 -0800)]
dsynth - Delete obsolete packages for 'dsynth everything'
* When runnig 'dsynth everything', delete any obsolete packages
in the repo that don't show up in the dports scan.
Requested-by: zrj
François Tigeot [Fri, 3 Jan 2020 18:08:37 +0000 (19:08 +0100)]
drm/linux: Add pci_alloc_consistent()
Tomohiro Kusumi [Fri, 3 Jan 2020 15:27:55 +0000 (00:27 +0900)]
usr.sbin/fstyp: Cleanup hammer2.c
* Change "goto done;" to "goto fail;" as these are all failures.
* Use lower case for error messages as fstyp uses lower case.
* Other minor fixes.