dragonfly.git
6 years agoAdd references to mount_hammer2.8 in a few manual pages.
Sascha Wildner [Tue, 13 Mar 2018 10:40:26 +0000 (11:40 +0100)]
Add references to mount_hammer2.8 in a few manual pages.

6 years agops.1: Update FILES section a bit.
Sascha Wildner [Tue, 13 Mar 2018 10:37:43 +0000 (11:37 +0100)]
ps.1: Update FILES section a bit.

6 years agomtree: Remove BSD.local.dist.
Sascha Wildner [Tue, 13 Mar 2018 10:30:01 +0000 (11:30 +0100)]
mtree: Remove BSD.local.dist.

The (d)ports framework uses its own Templates/BSD.local.dist.

Discussed-with: zrj

6 years agoetc/periodic: Add more xz(1)/zstd(1) support.
Sascha Wildner [Tue, 13 Mar 2018 10:01:43 +0000 (11:01 +0100)]
etc/periodic: Add more xz(1)/zstd(1) support.

6 years agoperiodic/security/800.loginfail: Add xz(1) and zstd(1) support.
Sascha Wildner [Tue, 13 Mar 2018 09:49:10 +0000 (10:49 +0100)]
periodic/security/800.loginfail: Add xz(1) and zstd(1) support.

6 years agoperiodic.conf.5: Document two more variables.
Sascha Wildner [Tue, 13 Mar 2018 09:21:59 +0000 (10:21 +0100)]
periodic.conf.5: Document two more variables.

6 years agokernel - Remove minidump debugging
Matthew Dillon [Tue, 13 Mar 2018 02:09:59 +0000 (19:09 -0700)]
kernel - Remove minidump debugging

* Remove minidump debugging "pdp %04x..." lines.  Minidump fixes have
  been well tested at this point.

6 years agoperiodic: Sync with FreeBSD current
Aaron LI [Thu, 8 Mar 2018 16:28:24 +0000 (00:28 +0800)]
periodic: Sync with FreeBSD current

* Sync periodic scripts, periodic.conf, periodic.conf.5 with FreeBSD
* The "{daily,weekly,monthly}_status_security_<var>_enable" variables are
  changed to be "security_status_<var>_enable" and
  "security_status_<var>_period" (daily, weekly, monthly).
* Keep DFly-specific settings (e.g., HAMMER and HAMMER2 related)
* Ignore the FreeBSD-specific things, e.g., ZFS, GEOM

6 years agorc.d/accounting: Sync with FreeBSD
Aaron LI [Thu, 8 Mar 2018 16:26:34 +0000 (00:26 +0800)]
rc.d/accounting: Sync with FreeBSD

Prepare to sync periodic with FreeBSD

6 years agoperiodic: Remove obsolete daily/status-named and weekly/clean-kvmdb
Aaron LI [Thu, 8 Mar 2018 16:24:33 +0000 (00:24 +0800)]
periodic: Remove obsolete daily/status-named and weekly/clean-kvmdb

6 years agoperiodic: Remove already disabled monthly statistics report
Aaron LI [Thu, 8 Mar 2018 16:14:47 +0000 (00:14 +0800)]
periodic: Remove already disabled monthly statistics report

The up-to-date tool can be obtained from DPorts: sysutils/bsdstats

To sync with FreeBSD

6 years agoperiodic(8): Sync with FreeBSD current
Aaron LI [Thu, 8 Mar 2018 03:10:19 +0000 (11:10 +0800)]
periodic(8): Sync with FreeBSD current

6 years agocryptsetup(8): Revert part of 0482a033108. We got mlockall().
Sascha Wildner [Mon, 12 Mar 2018 07:53:20 +0000 (08:53 +0100)]
cryptsetup(8): Revert part of 0482a033108. We got mlockall().

6 years agoinitrd/oinit: chdir to the new root before chroot to it
Aaron LI [Mon, 12 Mar 2018 04:10:39 +0000 (12:10 +0800)]
initrd/oinit: chdir to the new root before chroot to it

chroot(2) doesn't change the working directory of the current process,
therefore a single chroot(2) to a new root (during the early boot with
encrypted root) causes getcwd(3) fail, which further causes problems for
some rc scripts.

For example:
Without this fix, and by placing a 'echo "PWD=`pwd`"' to the beginning
of /etc/rc, the following messages were logged on the console:
Mar 12 10:40:28 dfly kernel: pwd: .: No such file or directory
Mar 12 10:40:28 dfly kernel: PWD=

Another example with "unbound" rc start:
Mar  3 09:28:11 dfly kernel: Obtaining a trust anchor:
Mar  3 09:28:11 dfly kernel: _su: No such file or directory
Mar  3 09:28:11 dfly kernel: _su: Trying to start from "/"
Mar  3 09:28:12 dfly kernel: .
Mar  3 09:28:12 dfly kernel: [1520040492] unbound-checkconf[1138:0] error: cannot getcwd: No such file or directory
Mar  3 09:28:12 dfly kernel: Starting unbound.
Mar  3 09:28:12 dfly kernel: [1520040492] unbound[1139:0] warning: unbound is already running as pid 1139.

uWSGI rc startup also failed to setup correct working directory due to
this problem.

6 years agoImport byacc-20170709
Antonio Huete Jimenez [Sun, 11 Mar 2018 15:17:21 +0000 (08:17 -0700)]
Import byacc-20170709

6 years agodisklabel64 - Make disktype optional, fix alignment bug
Matthew Dillon [Sat, 10 Mar 2018 21:39:59 +0000 (13:39 -0800)]
disklabel64 - Make disktype optional, fix alignment bug

* Make the disktype optional, use 'auto' automatically

* Fix a bug in the kernel's l64_makevirginlabel() calculation.
  It was not properly calculating the alignment relative to
  the physical disk.

* Refactor some of the documentation

* Refactor examples

Submitted-by: Aaron LI <aly@aaronly.me>
6 years agoboot/efi: Sync our TianoCore EDK II headers with the UDK2018 branch.
Sascha Wildner [Sat, 10 Mar 2018 19:34:23 +0000 (20:34 +0100)]
boot/efi: Sync our TianoCore EDK II headers with the UDK2018 branch.

Just comments in one header.

6 years agolocate(1): Bring in some updates/fixes from FreeBSD
Aaron LI [Sat, 10 Mar 2018 03:59:29 +0000 (11:59 +0800)]
locate(1): Bring in some updates/fixes from FreeBSD

* The default value of "FILESYSTEMS" option is now determined using lsvfs(1),
  which contains all local file systems that are not synthetic, loopback mounts
  or read-only.
* New config option "PRUNEDIRS" in /etc/locate.rc with default value of ".git"
  to ignore the ".git" directories when making database.
* Warn when locate.updatedb(8) is directly run by root
* Some cleanups (no functional change)
* Improve license declarations, fix white spaces and typos

6 years agolsvfs(1): Return simply 1 on failure.
Sascha Wildner [Sat, 10 Mar 2018 09:17:41 +0000 (10:17 +0100)]
lsvfs(1): Return simply 1 on failure.

6 years agolsvfs(1): Tabify the rest of lsvfs.c.
Sascha Wildner [Sat, 10 Mar 2018 09:17:00 +0000 (10:17 +0100)]
lsvfs(1): Tabify the rest of lsvfs.c.

6 years agolsvfs(1): Sync a bit with FreeBSD, as applicable.
Sascha Wildner [Sat, 10 Mar 2018 09:08:27 +0000 (10:08 +0100)]
lsvfs(1): Sync a bit with FreeBSD, as applicable.

Specifically, merge r185029/r251580 and sync the manual page.

Taken-from: FreeBSD

6 years agolsvfs.1: Explain why lsvfs(1) shows 2 references to UFS on encrypted root.
Sascha Wildner [Sat, 10 Mar 2018 08:16:00 +0000 (09:16 +0100)]
lsvfs.1: Explain why lsvfs(1) shows 2 references to UFS on encrypted root.

While here, fix two cases where a new sentence didn't start on a new
line.

Idea-by: Aaron LI <aly@aaronly.me>
6 years agonvmectl(8): Add missing DPADD in the Makefile.
Sascha Wildner [Fri, 9 Mar 2018 18:30:58 +0000 (19:30 +0100)]
nvmectl(8): Add missing DPADD in the Makefile.

6 years agolocate.updatedb(8): Add hammer2 support.
Sascha Wildner [Fri, 9 Mar 2018 08:26:53 +0000 (09:26 +0100)]
locate.updatedb(8): Add hammer2 support.

Reported-by: Aaron LI <aly@aaronly.me>
6 years agodes_crypt.3: Fix typo.
Sascha Wildner [Wed, 7 Mar 2018 09:15:19 +0000 (10:15 +0100)]
des_crypt.3: Fix typo.

6 years agopsm.4: Remove useless BUGS section.
Sascha Wildner [Wed, 7 Mar 2018 09:08:12 +0000 (10:08 +0100)]
psm.4: Remove useless BUGS section.

6 years agosysmouse.4: Fix some typos.
Sascha Wildner [Wed, 7 Mar 2018 09:03:59 +0000 (10:03 +0100)]
sysmouse.4: Fix some typos.

6 years agosys/vfs/autofs: Cleanups
Tomohiro Kusumi [Tue, 6 Mar 2018 18:27:04 +0000 (03:27 +0900)]
sys/vfs/autofs: Cleanups

Move local varaibles to inner scopes where possible.
The existing local variable declarations are mostly from FreeBSD,
but I've also changed NetBSD autofs the way this commit does.

(Don't do this for autofs userspace though. Increasing diff from
FreeBSD for non functional thing like this is much less important,
whereas kernel side is basically a rewrite.)

6 years agokernel/extp{read,write}v: Change ioccnt from u_int to int.
Sascha Wildner [Tue, 6 Mar 2018 07:46:34 +0000 (08:46 +0100)]
kernel/extp{read,write}v: Change ioccnt from u_int to int.

Just like preadv(), pwritev(). Struct uio's uio_ioccnt is also int.
Also adjust iovec_copyin() to take an int.

While here, make iovec const, also like in preadv/pwritev.

Discussed-with: dillon

6 years agosyscons: Remove unused variable.
zrj [Mon, 5 Mar 2018 07:21:33 +0000 (09:21 +0200)]
syscons: Remove unused variable.

6 years agosyscons - Fix NULL pointer access in 0d7c8a4d1cafae68239
Imre Vadász [Sun, 4 Mar 2018 21:49:59 +0000 (22:49 +0100)]
syscons - Fix NULL pointer access in 0d7c8a4d1cafae68239

6 years agoflopen.3: Use .Fa where appropriate.
Sascha Wildner [Sun, 4 Mar 2018 16:42:13 +0000 (17:42 +0100)]
flopen.3: Use .Fa where appropriate.

6 years agosyscons - Wait for drm modesetting at appropriate places.
Imre Vadász [Sun, 4 Mar 2018 13:51:34 +0000 (14:51 +0100)]
syscons - Wait for drm modesetting at appropriate places.

* This avoids races between userland using DRM, and the drm modesetting
  callbacks called by syscons.

* Always call the drm modesetting callback, when we are switching from a
  virtual terminal that is in Graphics mode. Before that was skipped unless
  we were switching to a virtual terminal that is in Text mode.
  However with the framebuffer mmap-ing through syscons, it also makes sense
  to use virtual terminals in Graphics mode, without going through drm. So
  we have to make sure to restore the syscons framebuffer there as well.

6 years agopc64 - Unmask some AMD Family 15h and 16h CPUs for TSC mpsync test.
Imre Vadász [Sun, 4 Mar 2018 12:03:57 +0000 (13:03 +0100)]
pc64 - Unmask some AMD Family 15h and 16h CPUs for TSC mpsync test.

* The problematic
  Erratum 778 "Processor Core Time Stamp Counters May Experience Drift" is
  only listed for Family 15h < Model 30h and for Family 16h < Model 30h
  (Family 15h == Bulldozer, and Family 16h == Jaguar).

6 years agoFix typo in MLINK name.
Sascha Wildner [Sun, 4 Mar 2018 09:18:24 +0000 (10:18 +0100)]
Fix typo in MLINK name.

6 years agoRemove some sendsys()/waitsys() remains.
Sascha Wildner [Sat, 3 Mar 2018 17:20:16 +0000 (18:20 +0100)]
Remove some sendsys()/waitsys() remains.

6 years agosysmouse - Fix sigio handling after c2962d9da8200947ee394b190eea39d437fb1af7
Imre Vadász [Wed, 28 Feb 2018 20:47:08 +0000 (21:47 +0100)]
sysmouse - Fix sigio handling after c2962d9da8200947ee394b190eea39d437fb1af7

6 years agoRemove some really old portability hacks that should no longer be needed.
Sascha Wildner [Sat, 3 Mar 2018 15:52:10 +0000 (16:52 +0100)]
Remove some really old portability hacks that should no longer be needed.

This no longer declares ftruncate()/lseek()/mmap() and truncate() in
either <stdio.h> or <sys/types.h>. 20 years after FreeBSD added it
(in r24896) we should be over it. What's left, we'll fix better.

6 years ago<arpa/inet.h>: Some cleanups.
Sascha Wildner [Sat, 3 Mar 2018 15:42:06 +0000 (16:42 +0100)]
<arpa/inet.h>: Some cleanups.

* Stop defining struct in6_addr. This doesn't belong here, and it was
  originally only added because of some issue in pkgsrc. Thanks to
  Sevan Janiyan for confirming that this no longer occurs.

* Incude <stdint.h> instead of the full <sys/types.h> and define
  in_addr_t and in_port_t per POSIX.

* Put inet_ntoa_r under __BSD_VISIBLE.

* Remove an obsolete comment.

6 years ago<pthread.h>: Add missing 'const' to four functions.
Sascha Wildner [Sat, 3 Mar 2018 15:34:48 +0000 (16:34 +0100)]
<pthread.h>: Add missing 'const' to four functions.

6 years agoSort SEE ALSO in two manual pages.
Sascha Wildner [Fri, 2 Mar 2018 13:30:48 +0000 (14:30 +0100)]
Sort SEE ALSO in two manual pages.

6 years agonfs.5: Add missing markup.
Sascha Wildner [Fri, 2 Mar 2018 07:10:50 +0000 (08:10 +0100)]
nfs.5: Add missing markup.

6 years agonfs.5: Clarify vfs.nfs.nfsv3_commit_on_close description a bit.
Sascha Wildner [Fri, 2 Mar 2018 07:08:07 +0000 (08:08 +0100)]
nfs.5: Clarify vfs.nfs.nfsv3_commit_on_close description a bit.

6 years ago{read,write}.2: A bit more cleanup. Also add ext*() MLINKS.
Sascha Wildner [Fri, 2 Mar 2018 06:40:17 +0000 (07:40 +0100)]
{read,write}.2: A bit more cleanup. Also add ext*() MLINKS.

6 years agoworld - Document extpread() and extpwrite()
Matthew Dillon [Fri, 2 Mar 2018 02:57:11 +0000 (18:57 -0800)]
world - Document extpread() and extpwrite()

* Document these DragonFly-specific system calls.

6 years agofstat(1): Add hammer2 support.
Sascha Wildner [Wed, 28 Feb 2018 13:24:07 +0000 (14:24 +0100)]
fstat(1): Add hammer2 support.

6 years ago<vfs/hammer2/hammer2.h>: Expose VTOI() with _KERNEL_STRUCTURES.
Sascha Wildner [Wed, 28 Feb 2018 13:22:56 +0000 (14:22 +0100)]
<vfs/hammer2/hammer2.h>: Expose VTOI() with _KERNEL_STRUCTURES.

6 years agokernel/netgraph7: Fix panic
Markus Pfeiffer [Sat, 24 Feb 2018 14:11:06 +0000 (14:11 +0000)]
kernel/netgraph7: Fix panic

We just unset the M_HASH flag for the mbuf before queueing the
message to the netisr, making sure the handler doesn't run
on the wrong CPU.

6 years agolibc: Fix a comment in Makefile.inc.
Sascha Wildner [Fri, 23 Feb 2018 08:30:55 +0000 (09:30 +0100)]
libc: Fix a comment in Makefile.inc.

6 years agostring.3: Fix types of strlcat() and strlcpy() prototypes.
Sascha Wildner [Fri, 23 Feb 2018 07:57:14 +0000 (08:57 +0100)]
string.3: Fix types of strlcat() and strlcpy() prototypes.

6 years agosyscons - Detangle sysmouse from tty handling, implement a custom FIFO.
Imre Vadász [Thu, 22 Feb 2018 21:54:33 +0000 (22:54 +0100)]
syscons - Detangle sysmouse from tty handling, implement a custom FIFO.

* This avoids unnecessary IPIs and other overhead from the tty handling.

* This also makes reads from the character device always get only complete
  sysmouse packets.

6 years agosyscons - No special minor device number is needed anymore for sysmouse.
Imre Vadász [Thu, 22 Feb 2018 21:54:10 +0000 (22:54 +0100)]
syscons - No special minor device number is needed anymore for sysmouse.

6 years agoselect.2: timeout is restrict too.
Sascha Wildner [Thu, 22 Feb 2018 17:56:30 +0000 (18:56 +0100)]
select.2: timeout is restrict too.

6 years agoAdd missing restrict qualifiers to various manual pages.
Sascha Wildner [Thu, 22 Feb 2018 17:40:14 +0000 (18:40 +0100)]
Add missing restrict qualifiers to various manual pages.

6 years agokernel/u4b: Some additional work for the recent cdce(4) addition.
Sascha Wildner [Thu, 22 Feb 2018 13:37:35 +0000 (14:37 +0100)]
kernel/u4b: Some additional work for the recent cdce(4) addition.

* Add a manual page from FreeBSD.

* Add to LINT64.

* Adjust devd(8) configuration so that cdce.ko automatically loads upon
  plugging.

6 years agokernel/u4b: Use CDCE_LOCK/CDCE_UNLOCK macros
Markus Pfeiffer [Wed, 21 Feb 2018 23:57:23 +0000 (23:57 +0000)]
kernel/u4b: Use CDCE_LOCK/CDCE_UNLOCK macros

6 years agokernel: port if_cdce
Markus Pfeiffer [Mon, 19 Feb 2018 20:59:02 +0000 (20:59 +0000)]
kernel: port if_cdce

While here also update it to FreeBSD's

6 years agokernel/acpi: Remove the old APM emulation code.
Sascha Wildner [Thu, 22 Feb 2018 06:50:13 +0000 (07:50 +0100)]
kernel/acpi: Remove the old APM emulation code.

This is no longer needed by anything. The <machine/apm_bios.h> header
with APM ioctl defines can go as well.

While here, do a little adjustment of comments and manual pages too.

Pointed-out-by: ivadasz
6 years agoUPGRADING: Mention the recent removal of 'device virtio_pci'.
Sascha Wildner [Wed, 21 Feb 2018 10:01:29 +0000 (11:01 +0100)]
UPGRADING: Mention the recent removal of 'device virtio_pci'.

6 years agonrelease - Add missing headers to src-sys.tar.bz2
Matthew Dillon [Tue, 20 Feb 2018 18:47:26 +0000 (10:47 -0800)]
nrelease - Add missing headers to src-sys.tar.bz2

* Add missing headers to src-sys.tar.bz2 so 'make nativekernel'
  actually works.

Reported-by: Constantine A. Murenin
6 years agolibc/libc_rtld: Fix up some comments in the Makefiles.
Sascha Wildner [Tue, 20 Feb 2018 13:28:02 +0000 (14:28 +0100)]
libc/libc_rtld: Fix up some comments in the Makefiles.

6 years agogpt - Add a new directive called 'init'
Matthew Dillon [Tue, 20 Feb 2018 08:39:01 +0000 (00:39 -0800)]
gpt - Add a new directive called 'init'

* Add a new directive called 'init'.  This directive works like
  gpt create except it will also create a msdos slice 0 (and newfs_msdos
  it), and a "DragonFly Label64" slice 1, and
  'disklabel -r -w <slice1> auto'.

* If -B is also specified, the init directive will populate the msdos
  filesystem with efi/boot/bootx64.efi, and also supplies -B to the
  disklabel command.

* This command does not create the boot, swap, or root filesystem
  partitions in the disklabel.  It is meant to do something similar
  to what fdisk -IB used to do for us for legacy partitions (though
  I should note that fdisk -IB didn't initialize a new disklabel).  But
  we do for gpt.

6 years agokernel/ncr: Fix double assignment.
Sascha Wildner [Tue, 20 Feb 2018 07:36:41 +0000 (08:36 +0100)]
kernel/ncr: Fix double assignment.

Taken-from: FreeBSD

6 years agokernel/i915: Fix double assignment (Linux' ed58570f55e2c5755).
Sascha Wildner [Tue, 20 Feb 2018 07:30:16 +0000 (08:30 +0100)]
kernel/i915: Fix double assignment (Linux' ed58570f55e2c5755).

6 years agokernel/i915: Fix double assignment (Linux' 52eb92c6fe8f89c30).
Sascha Wildner [Tue, 20 Feb 2018 07:25:33 +0000 (08:25 +0100)]
kernel/i915: Fix double assignment (Linux' 52eb92c6fe8f89c30).

6 years agortadvd(8): Fix double assignment.
Sascha Wildner [Tue, 20 Feb 2018 07:10:06 +0000 (08:10 +0100)]
rtadvd(8): Fix double assignment.

ra->nd_ra_flags_reserved is initialized properly a few lines below.
Assigning 0 first is unnecessary.

6 years agokernel/urtw: Fix double assignments.
Sascha Wildner [Tue, 20 Feb 2018 07:05:43 +0000 (08:05 +0100)]
kernel/urtw: Fix double assignments.

This driver hasn't been properly ported and isn't built currently. The
fix is just to silence coccinelle when searching for double assignments.

Taken-from: FreeBSD

6 years agotools/w00t: Fix double assignment.
Sascha Wildner [Tue, 20 Feb 2018 06:57:52 +0000 (07:57 +0100)]
tools/w00t: Fix double assignment.

6 years agoFix two double assignments in the kernel and the boot code.
Sascha Wildner [Mon, 19 Feb 2018 12:46:53 +0000 (13:46 +0100)]
Fix two double assignments in the kernel and the boot code.

6 years agovirtio - Remove explicit load of virtio.ko. Remove device virtio_pci line.
Imre Vadász [Sun, 12 Mar 2017 12:54:48 +0000 (13:54 +0100)]
virtio - Remove explicit load of virtio.ko. Remove device virtio_pci line.

* virtio.ko never needs to be loaded explicitly, since virtio_pci.ko
  depends on it.

* Also get rid of device virtio_pci line in the kernel config. Similar to
  other buses, link virtio_pci statically into the kernel when both
  device virtio and device pci are configured.

6 years agoncurses: Make sure to pass NXCFLAGS to NXCC.
zrj [Mon, 5 Feb 2018 18:04:30 +0000 (20:04 +0200)]
ncurses: Make sure to pass NXCFLAGS to NXCC.

Only the -I... paths are needed for cpp invocation.

6 years agoLIBPRIV: Make sure sh(1) only depends on lib.so.
zrj [Wed, 7 Feb 2018 14:48:20 +0000 (16:48 +0200)]
LIBPRIV: Make sure sh(1) only depends on lib.so.

Avoid possible cases of failed installworld target.

6 years agosh(1): Add and use pregenerated headers.
zrj [Tue, 6 Feb 2018 21:56:48 +0000 (23:56 +0200)]
sh(1): Add and use pregenerated headers.

These only add 30k to the repo while ensuring that bin/sh would not be
affected by bad shell script invocation etc. As the bonus it solves the
issue in share/initrd too. Nothing in the generated headers should fail
for our use cases. If that would change, please report it.

6 years agodevinfo - Print info, whether a device is flagged as disabled.
Imre Vadász [Mon, 5 Feb 2018 17:19:52 +0000 (18:19 +0100)]
devinfo - Print info, whether a device is flagged as disabled.

* Also make -v print only enabled devices, specifying -v twice will also
  print disabled devices. This should make "devinfo -v" output less
  confusing on modern hardware with lots of non-present devices in the ACPI
  namespace.

6 years agolibdevinfo - Fix enum devinfo_state.
Imre Vadász [Mon, 5 Feb 2018 17:19:33 +0000 (18:19 +0100)]
libdevinfo - Fix enum devinfo_state.

6 years agokern - Add D_MEM flag to /dev/mem and /dev/kmem character devices.
Imre Vadász [Mon, 5 Feb 2018 20:24:11 +0000 (21:24 +0100)]
kern - Add D_MEM flag to /dev/mem and /dev/kmem character devices.

* This makes seeking actually work on these character devices, which fixes
  performance of various tools when reading from /dev/mem or /dev/kmem.

6 years agoatkbdc - Do not attach PS2 controller via legacy ISA bus, if FADT says so.
Imre Vadász [Thu, 1 Feb 2018 12:16:55 +0000 (13:16 +0100)]
atkbdc - Do not attach PS2 controller via legacy ISA bus, if FADT says so.

* If the FADT BootFlags value tells us that we shouldn't expect the PS2
  controller to be at the IO ports 0x60/0x64, we should instead only attach
  the atkbdc driver when there is a matching device in the ACPI namespace.

* This avoids attempts to attach the atkbdc PS2 controller driver on
  hardware which doesn't have a usable PS2 controller. This happens on
  many modern notebooks, and has been the case for some time on desktop
  hardware that doesn't provide an emulated PS2 controller for using USB
  input devices all the time (it either is never initialized, or might
  get disabled by some of the ACPI or USB initialization during bootup).

6 years agoReplace local array size calculations with NELEM().
Sascha Wildner [Sun, 18 Feb 2018 01:42:43 +0000 (02:42 +0100)]
Replace local array size calculations with NELEM().

6 years agoConvert from __arysize to NELEM
Eitan Adler [Fri, 16 Feb 2018 08:53:39 +0000 (00:53 -0800)]
Convert from __arysize to NELEM

Try to use a single macro across the board

Discussed-with: zrj, swildner

6 years agonfs.5: Adjust (c) year.
Sascha Wildner [Sat, 17 Feb 2018 22:35:11 +0000 (23:35 +0100)]
nfs.5: Adjust (c) year.

6 years agonfs.5: Remove unneeded .Pp
Sascha Wildner [Sat, 17 Feb 2018 22:31:09 +0000 (23:31 +0100)]
nfs.5: Remove unneeded .Pp

6 years agodevfs.5: Document sysctl.
Sascha Wildner [Sat, 17 Feb 2018 22:29:15 +0000 (23:29 +0100)]
devfs.5: Document sysctl.

Submitted-by: zrj
6 years agoffs.5: Document more sysctls.
Sascha Wildner [Sat, 17 Feb 2018 22:28:15 +0000 (23:28 +0100)]
ffs.5: Document more sysctls.

Move ffs sysctls to their own section.

Submitted-by: zrj
6 years agoAdd nfs(5) manpage.
Sascha Wildner [Sat, 17 Feb 2018 22:27:03 +0000 (23:27 +0100)]
Add nfs(5) manpage.

Document all sysctls.

Submitted-by: zrj
6 years agoAdd vfs(7) manpage.
Sascha Wildner [Sat, 17 Feb 2018 22:25:39 +0000 (23:25 +0100)]
Add vfs(7) manpage.

Document all sysctls except for sizeof stuct ones.

Submitted-by: zrj
6 years agokernel - Fix syscons's visual bell
Matthew Dillon [Sat, 17 Feb 2018 19:29:49 +0000 (11:29 -0800)]
kernel - Fix syscons's visual bell

* The visual bell code was completely broken.

* Refactor the callout, and use the new callout_init_lk facility
  to deal with races.

Reported-by: snurg
6 years agodrm/linux: Update hlist_for_each_entry_safe() from FreeBSD
François Tigeot [Sat, 17 Feb 2018 08:56:55 +0000 (09:56 +0100)]
drm/linux: Update hlist_for_each_entry_safe() from FreeBSD

6 years agosbin/hammer: Fix compile warning on Linux
Tomohiro Kusumi [Sat, 17 Feb 2018 01:49:39 +0000 (10:49 +0900)]
sbin/hammer: Fix compile warning on Linux

Warned by gcc 7.3.1 in Fedora.
Extend the size of destination string.
dirent::d_name[] is 256 bytes in Linux (and *BSD).

--
cmd_abort.c: In function 'hammer_cmd_abort_cleanup':
cmd_abort.c:73:44: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 55 [-Wformat-truncation=]
    snprintf (pidfile, PIDFILE_BUFSIZE, "%s/%s",
                                            ^~
cmd_abort.c:73:4: note: 'snprintf' output between 10 and 265 bytes into a destination of size 64
    snprintf (pidfile, PIDFILE_BUFSIZE, "%s/%s",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     pidfile_loc, den->d_name);
     ~~~~~~~~~~~~~~~~~~~~~~~~~

6 years agomille(6): minor nits
Eitan Adler [Fri, 16 Feb 2018 08:13:08 +0000 (00:13 -0800)]
mille(6): minor nits

- adding missing header
- remove unused variable
- static where possible

Reviewed-by: zrj

6 years agogcc50: Switch backends to use internal lib framework.
zrj [Wed, 14 Feb 2018 15:08:24 +0000 (17:08 +0200)]
gcc50: Switch backends to use internal lib framework.

Previously backends where implicitly using bsd.hostlib.mk that have few
unwanted side effects (backends are install targets). Avoid that.
No functional change for current master users.

Tested-with: WORLD_CCVER and _DEFAULT_CCVER combinations.

6 years agofish(6): Suppress -Wdiscarded-qualifiers warning.
zrj [Thu, 15 Feb 2018 13:43:06 +0000 (15:43 +0200)]
fish(6): Suppress -Wdiscarded-qualifiers warning.

6 years ago/usr/Makefile: Fix typo.
Sascha Wildner [Thu, 15 Feb 2018 14:19:30 +0000 (15:19 +0100)]
/usr/Makefile: Fix typo.

6 years agocorrect prior commit...
Eitan Adler [Thu, 15 Feb 2018 12:21:58 +0000 (04:21 -0800)]
correct prior commit...

6 years agolarn(6): fix open call
Eitan Adler [Thu, 15 Feb 2018 12:17:58 +0000 (04:17 -0800)]
larn(6): fix open call

Prior to this the ", 0666" was being treated like the comma operator
rather than an argument to open(2).

6 years agolarn(6): remove HIDEBYLINK
Eitan Adler [Thu, 15 Feb 2018 12:10:13 +0000 (04:10 -0800)]
larn(6): remove HIDEBYLINK

The implementation of HIDEBYLINK is a bit wonky, doesn't really work,
and includes its own reimplementation of bzero.

6 years agofish(6): fix several issues
Eitan Adler [Thu, 15 Feb 2018 11:52:52 +0000 (03:52 -0800)]
fish(6): fix several issues

- avoid use of _ in application namespace
- use posix_spawnp instead of system()
- prefer less(1) over more(1)
- mark usage as dead
- staticfy

This world-class programs deserves world-class source code.

6 years agoUpdate the pciconf(8) database.
Sascha Wildner [Thu, 15 Feb 2018 11:03:40 +0000 (12:03 +0100)]
Update the pciconf(8) database.

February 15, 2018 snapshot from https://pci-ids.ucw.cz

6 years ago<pthread.h>: Note that we are missing some functions in #if 0'd protos.
Sascha Wildner [Thu, 15 Feb 2018 09:10:34 +0000 (10:10 +0100)]
<pthread.h>: Note that we are missing some functions in #if 0'd protos.

6 years agodevd: only use correct argument in select(2)
Eitan Adler [Thu, 15 Feb 2018 08:53:49 +0000 (00:53 -0800)]
devd: only use correct argument in select(2)

Discussed-with: zrj
Reviewed-by: vangyzen@FreeBSD.org, ian@FreeBSD.org
Objected-to-by: imp@FreeBSD.org

6 years agoselect(2): mark as restrict in man page
Eitan Adler [Thu, 15 Feb 2018 08:40:34 +0000 (00:40 -0800)]
select(2): mark as restrict in man page

This has already been done in code, so change the man page

Discussed-with: swildner