openbsd
7 years agocomplete "nodepend" in source
espie [Tue, 4 Jul 2017 12:43:07 +0000 (12:43 +0000)]
complete "nodepend" in source

- mix-up between .ALLSRC and .IMPSRC, compile the right gc.c file
- add explicit targets for pre-generated stuff

7 years agoHandle 0 size of preview box in caller.
nicm [Tue, 4 Jul 2017 12:26:14 +0000 (12:26 +0000)]
Handle 0 size of preview box in caller.

7 years agoBackout previous due to a bug discovered by zhuk@ that requires some tinkering
anton [Tue, 4 Jul 2017 11:46:15 +0000 (11:46 +0000)]
Backout previous due to a bug discovered by zhuk@ that requires some tinkering
and is not an easy fix for now.

7 years agoAdd GRACEFUL_SHUTDOWN example to bgpd.conf
job [Tue, 4 Jul 2017 09:33:36 +0000 (09:33 +0000)]
Add GRACEFUL_SHUTDOWN example to bgpd.conf

OK phessler@

7 years agoExport our atomic definitions to userland instead of gcc builtins.
mpi [Tue, 4 Jul 2017 09:00:12 +0000 (09:00 +0000)]
Export our atomic definitions to userland instead of gcc builtins.

ok kettenis@, dlg@

7 years agogenerate the parser directly instead of fucking around
espie [Tue, 4 Jul 2017 08:39:57 +0000 (08:39 +0000)]
generate the parser directly instead of fucking around

7 years agoAdd support for pattern substitution to variables in ksh using a common syntax
anton [Tue, 4 Jul 2017 07:29:32 +0000 (07:29 +0000)]
Add support for pattern substitution to variables in ksh using a common syntax
borrowed from ksh93.

Survived a ports build performed by naddy@ and encouraged by many.

7 years agoconsistently use the evtimer wrappers around the connection timeout.
dlg [Tue, 4 Jul 2017 01:09:42 +0000 (01:09 +0000)]
consistently use the evtimer wrappers around the connection timeout.

this is instead of setting the timeout up with event_set and
event_add, but removing it with evtimer_del. this uses evtimer_set
and evtimer_add.

7 years agoinclude stdarg.h explicitly instead of relying on event.h to bring it in.
dlg [Tue, 4 Jul 2017 01:07:32 +0000 (01:07 +0000)]
include stdarg.h explicitly instead of relying on event.h to bring it in.

7 years agolet BUILDFIRST just build first, using the same trick guenther@ did in
espie [Tue, 4 Jul 2017 00:59:11 +0000 (00:59 +0000)]
let BUILDFIRST just build first, using the same trick guenther@ did in
kernel Makefiles (thank you!), also add lex and yacc generated files to
that list.

Let those lex/yacc variables be defined for bsd.lib.mk as well.

Complete the SRCS -> OBJS hints with the library dependency

This should fix most dependency problems.

Commit now, so that people can check if something else is still amiss.
krw@ agrees

7 years agoproperly adjust the ttl of replies instead of freezing them in time
tedu [Tue, 4 Jul 2017 00:30:45 +0000 (00:30 +0000)]
properly adjust the ttl of replies instead of freezing them in time

7 years agoblacklist MSI on intel m.2 optane parts. it just doesnt work there.
dlg [Mon, 3 Jul 2017 23:27:53 +0000 (23:27 +0000)]
blacklist MSI on intel m.2 optane parts. it just doesnt work there.

discovered by jmatthew@
tweaks and ok jsg@ kettenis@

7 years agoDo not grab the socket lock in doaccept() twice. Pass NOTE_SUBMIT
bluhm [Mon, 3 Jul 2017 23:05:21 +0000 (23:05 +0000)]
Do not grab the socket lock in doaccept() twice.  Pass NOTE_SUBMIT
to KNOTE() as we are already holding the lock.  Fixes "panic:
rw_enter: netlock locking against myself" reported by Gregor Best
and reproduced with src/regress/lib/libtls/gotls.
OK millert@

7 years agoChange session and window preview so that the current window or pane is
nicm [Mon, 3 Jul 2017 22:48:02 +0000 (22:48 +0000)]
Change session and window preview so that the current window or pane is
always shown.

7 years agono need to generate y.tab.h if nothing uses it, set YFLAGS to nothing
espie [Mon, 3 Jul 2017 22:21:47 +0000 (22:21 +0000)]
no need to generate y.tab.h if nothing uses it, set YFLAGS to nothing
instead of CLEANFILES += y.tab.h

okay millert@

7 years agosizeof(struct sockaddr_in) != sizeof(struct in_addr).
krw [Mon, 3 Jul 2017 22:06:11 +0000 (22:06 +0000)]
sizeof(struct sockaddr_in) != sizeof(struct in_addr).

Fix construction of the unicast UDP packets being sent
out via sendmsg(). Accidentally broken in r1.32 (5.6)
when types were juggled.

ok bluhm@

7 years agoAdd more checks and debug info to identify the sporadic test failures.
bluhm [Mon, 3 Jul 2017 19:35:06 +0000 (19:35 +0000)]
Add more checks and debug info to identify the sporadic test failures.

7 years agoBoth PF_ROUTE and PF_KEY need to start to take care of their own PCB list
claudio [Mon, 3 Jul 2017 19:23:47 +0000 (19:23 +0000)]
Both PF_ROUTE and PF_KEY need to start to take care of their own PCB list
to simplify the locking of those lists. For now move the LIST_ENTRY from
rawcb into routecb and in the pfkey case a new keycb. Do some cleanup and
renaming in the pfkey code but more to come.
OK bluhm@ mpi@

7 years agos/log_warn/log_warnx/ where errno is not set
florian [Mon, 3 Jul 2017 19:02:04 +0000 (19:02 +0000)]
s/log_warn/log_warnx/ where errno is not set

7 years agoRemove obvious clear_config() comments and misleading state_change() comments.
benno [Mon, 3 Jul 2017 18:45:34 +0000 (18:45 +0000)]
Remove obvious clear_config() comments and misleading state_change() comments.
Also relocate do_action() calls for the init block from change_state() to
occur with the corresponding do_action() calls for the body block.
From Rob Pierce
ok stsp@ and i

7 years agoGenerate source and header files for regress on demand.
bluhm [Mon, 3 Jul 2017 18:19:55 +0000 (18:19 +0000)]
Generate source and header files for regress on demand.
OK espie@

7 years agoreport trailing delimiters after macros where they are usually a mistake;
schwarze [Mon, 3 Jul 2017 17:33:01 +0000 (17:33 +0000)]
report trailing delimiters after macros where they are usually a mistake;
the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>

7 years agoUse copyin32() instead of copyin() in RDHWR emulation.
visa [Mon, 3 Jul 2017 16:37:07 +0000 (16:37 +0000)]
Use copyin32() instead of copyin() in RDHWR emulation.
This reduces emulation time about 5%.

7 years agodon't bother caching invalid or very short lived responses
tedu [Mon, 3 Jul 2017 16:36:48 +0000 (16:36 +0000)]
don't bother caching invalid or very short lived responses

7 years agoLink all lib regress tests to the build.
bluhm [Mon, 3 Jul 2017 16:24:51 +0000 (16:24 +0000)]
Link all lib regress tests to the build.

7 years agoallows working without depends, as discovered and discussed with drahn@
espie [Mon, 3 Jul 2017 15:17:11 +0000 (15:17 +0000)]
allows working without depends, as discovered and discussed with drahn@
okay drahn@

7 years agore-add dependencies from SRCS to corresponding OBJS.
espie [Mon, 3 Jul 2017 15:11:02 +0000 (15:11 +0000)]
re-add dependencies from SRCS to corresponding OBJS.
the old mkdep run did walk the SRCS list and write those as a side-effect.

Without this, bsd.prog.mk .SUFFIXES order will have OBJS depend on the
wrong src file.

Causes of the alpha/stand/bootxx breakage.

7 years agomarkup fixes;
jmc [Mon, 3 Jul 2017 14:30:11 +0000 (14:30 +0000)]
markup fixes;

7 years agowarn about time machines; suggested by Thomas Klausner <wiz @ NetBSD>
schwarze [Mon, 3 Jul 2017 13:40:00 +0000 (13:40 +0000)]
warn about time machines; suggested by Thomas Klausner <wiz @ NetBSD>

7 years agomerge error, revealed by clang; ok kettenis@
naddy [Mon, 3 Jul 2017 13:26:04 +0000 (13:26 +0000)]
merge error, revealed by clang; ok kettenis@

7 years agoChange previous to not wait for both process exit and pty close -
nicm [Mon, 3 Jul 2017 12:38:50 +0000 (12:38 +0000)]
Change previous to not wait for both process exit and pty close -
instead if there is a pipe-pane active, do not exit until all data is
read (including any libevent hasn't seen yet). Fixes problem reported by
Theo Buehler and still seems to solve the original issue.

7 years agoRemove mdoclint(1) from the tree.
schwarze [Mon, 3 Jul 2017 11:21:23 +0000 (11:21 +0000)]
Remove mdoclint(1) from the tree.
All functionality is now covered by mandoc -Tlint.
OK jmc@ wiz@

7 years agocheck that a cachehit hasn't expired before using it.
tedu [Mon, 3 Jul 2017 09:39:48 +0000 (09:39 +0000)]
check that a cachehit hasn't expired before using it.

7 years agoReplace slot time durations with macros.
kevlo [Mon, 3 Jul 2017 09:21:09 +0000 (09:21 +0000)]
Replace slot time durations with macros.

ok stsp@

7 years agoProtect `so_state', `so_snd' and `so_rcv' with the socket lock in
mpi [Mon, 3 Jul 2017 08:31:39 +0000 (08:31 +0000)]
Protect `so_state', `so_snd' and `so_rcv' with the socket lock in
kqueue filters.

ok millert@, bluhm@, visa@

7 years agoProtect `so_state', `so_error' and `so_qlen' with the socket lock in
mpi [Mon, 3 Jul 2017 08:29:24 +0000 (08:29 +0000)]
Protect `so_state', `so_error' and `so_qlen' with the socket lock in
kqueue filters.

ok millert@, bluhm@, visa@

7 years agoNote arm64 and armv7.
visa [Mon, 3 Jul 2017 08:27:59 +0000 (08:27 +0000)]
Note arm64 and armv7.

7 years agoNot all sockets require the NET_LOCK(). So use solock() instead in
mpi [Mon, 3 Jul 2017 08:27:07 +0000 (08:27 +0000)]
Not all sockets require the NET_LOCK().  So use solock() instead in
fifo_close().

ok millert@, visa@

7 years agoUpdate attachment on octeon.
visa [Mon, 3 Jul 2017 08:23:36 +0000 (08:23 +0000)]
Update attachment on octeon.

7 years agoAttach com(4) using fdt on octeon.
visa [Mon, 3 Jul 2017 08:17:20 +0000 (08:17 +0000)]
Attach com(4) using fdt on octeon.

The relevant part of uartbus(4) is made part of the com(4) glue
to avoid extra maneuvers in the code.

7 years agoDo not close panes until process has exited and any outstanding data
nicm [Mon, 3 Jul 2017 08:16:03 +0000 (08:16 +0000)]
Do not close panes until process has exited and any outstanding data
has been written to the pipe-pane event if there is one. GitHub issue 991.

7 years agoDrop the KERNEL_LOCK() in pf_purge_thread().
mpi [Mon, 3 Jul 2017 08:11:21 +0000 (08:11 +0000)]
Drop the KERNEL_LOCK() in pf_purge_thread().

The NET_LOCK() is currently what guarantees that accesses to PF data
structures are serialized.

While here use rwsleep(9) instead of calling NET_LOCK()/NET_UNLOCK()
for every iteration.

Tested by Hrvoje Popovski, ok sashan@, visa@

7 years agoTry C.UTF-8 which is also a commonly useful locale on some platforms,
nicm [Mon, 3 Jul 2017 08:08:30 +0000 (08:08 +0000)]
Try C.UTF-8 which is also a commonly useful locale on some platforms,
from Romain Francoise.

7 years agoAdd the first UART into the fdt blob.
visa [Mon, 3 Jul 2017 07:58:42 +0000 (07:58 +0000)]
Add the first UART into the fdt blob.

7 years agoexplicitly pass -MD -MP in DFLAGS, so that even if CFLAGS are forced
espie [Mon, 3 Jul 2017 07:54:18 +0000 (07:54 +0000)]
explicitly pass -MD -MP in DFLAGS, so that even if CFLAGS are forced
on the command line, things will still work

7 years agoRemove settings that were unimplemented for 20 years; update STANDARDS.
bentley [Mon, 3 Jul 2017 07:01:14 +0000 (07:01 +0000)]
Remove settings that were unimplemented for 20 years; update STANDARDS.

ok jmc@ natano@

7 years agoregen
dlg [Mon, 3 Jul 2017 06:33:24 +0000 (06:33 +0000)]
regen

7 years agointel optanes are a thing
dlg [Mon, 3 Jul 2017 06:32:54 +0000 (06:32 +0000)]
intel optanes are a thing

7 years agobe explicit in the lex/yacc dependencies
espie [Mon, 3 Jul 2017 00:17:52 +0000 (00:17 +0000)]
be explicit in the lex/yacc dependencies
reluctant okay deraadt@

7 years agowhitespace
deraadt [Sun, 2 Jul 2017 23:19:07 +0000 (23:19 +0000)]
whitespace

7 years agoIf a single page references the same non-existent manual more than
schwarze [Sun, 2 Jul 2017 21:17:12 +0000 (21:17 +0000)]
If a single page references the same non-existent manual more than
once, print "(N times)" after the message "referenced manual not
found", to lessen the risk that people fix the first instance and
miss the others; jmc@ confirmed that this is useful.

7 years agoEnable MIPI/DSI support for inteldrm(4). Makes the display on my ASUS
kettenis [Sun, 2 Jul 2017 20:58:55 +0000 (20:58 +0000)]
Enable MIPI/DSI support for inteldrm(4).  Makes the display on my ASUS
Transformer Book T100HA work (with some ugly error/warning messages).

7 years agore-enable PAT
mlarkin [Sun, 2 Jul 2017 19:49:31 +0000 (19:49 +0000)]
re-enable PAT

discussed with deraadt a month or so ago, this has been sitting in my
tree since then.

7 years agoFixed a typo in error message.
tobias [Sun, 2 Jul 2017 19:06:12 +0000 (19:06 +0000)]
Fixed a typo in error message.

ok jmc@

7 years agorepair the tree, make sure y.tab.h is there before compiling yacc files.
espie [Sun, 2 Jul 2017 18:11:28 +0000 (18:11 +0000)]
repair the tree, make sure y.tab.h is there before compiling yacc files.

problem noticed by deraadt@

7 years agosomehow, I did NOT commit the patch I sent to tb@. Matthieu noticed it.
espie [Sun, 2 Jul 2017 17:55:14 +0000 (17:55 +0000)]
somehow, I did NOT commit the patch I sent to tb@. Matthieu noticed it.
commit the right DEPS definition.

7 years agodocument new depends somewhat.
espie [Sun, 2 Jul 2017 17:03:45 +0000 (17:03 +0000)]
document new depends somewhat.
I asked jmc, told me to go ahead and he'd review it when he can.

7 years agoadd warning "cross reference to self"; inspired by mdoclint
schwarze [Sun, 2 Jul 2017 15:31:48 +0000 (15:31 +0000)]
add warning "cross reference to self"; inspired by mdoclint

7 years agoSecond diff to rename additional "always" variable in struct ifsd_config.
benno [Sun, 2 Jul 2017 15:28:26 +0000 (15:28 +0000)]
Second diff to rename additional "always" variable in struct ifsd_config.
from Rob Pierce.
Requested by stsp@

7 years agoAdd the definition of IEEE80211_DUR_DS_SHSLOT.
kevlo [Sun, 2 Jul 2017 14:48:19 +0000 (14:48 +0000)]
Add the definition of IEEE80211_DUR_DS_SHSLOT.

From IEEE Std. 802.11-2016, Table 18-5 "ERP characteristics", p. 2332:

aSlotTime characteristic:
 If dont11OperatingClassesRequired is false:
 Long  = 20 us
 Short = 9 us

ok stsp@

7 years agoRemove unused variable from header file.
benno [Sun, 2 Jul 2017 14:30:35 +0000 (14:30 +0000)]
Remove unused variable from header file.
from Rob Pierce.

ok stsp@ and me

7 years agoRemove variable assignment in declaration and add whitespace to improve
benno [Sun, 2 Jul 2017 14:28:45 +0000 (14:28 +0000)]
Remove variable assignment in declaration and add whitespace to improve
readability. No functional change.
from Rob Pierce.

ok stsp@ and me

7 years agoRename one of the "always" variables to "body" for improved readability.
benno [Sun, 2 Jul 2017 14:27:30 +0000 (14:27 +0000)]
Rename one of the "always" variables to "body" for improved readability.
No functional change.
from Rob Pierce.

ok stsp@ and me

7 years agoShorter version of the same.
rpe [Sun, 2 Jul 2017 12:45:43 +0000 (12:45 +0000)]
Shorter version of the same.

based on a mail from Klemens Nanni on tech@

7 years agoTweak comment
rpe [Sun, 2 Jul 2017 11:53:35 +0000 (11:53 +0000)]
Tweak comment

7 years agoNIFS is checked inside start_cgiinfo() already.
rpe [Sun, 2 Jul 2017 11:52:44 +0000 (11:52 +0000)]
NIFS is checked inside start_cgiinfo() already.
No need to do this check twice.

from Klemens Nanni

7 years agoReplace fgetln with POSIX getline, even though file was using fgetln in
brynet [Sun, 2 Jul 2017 10:58:15 +0000 (10:58 +0000)]
Replace fgetln with POSIX getline, even though file was using fgetln in
the idiomatic safe way. Also, check for stream errors with ferror and
err(1, "") in that case.

with feedback from joerg@, schwarze@, nicm@

ok nicm "code is shorter anyway", and joerg@ for an earlier diff

7 years agoUnbreak tree by putting revised resolv_conf_priority() declaration in
krw [Sun, 2 Jul 2017 09:11:13 +0000 (09:11 +0000)]
Unbreak tree by putting revised resolv_conf_priority() declaration in
correct place and passing the invocation the correct parameters.

Noticed by & initial diff from matthieu@

7 years agoFix the set of octmmc.4.
visa [Sun, 2 Jul 2017 07:46:05 +0000 (07:46 +0000)]
Fix the set of octmmc.4.

7 years agosync
visa [Sun, 2 Jul 2017 07:42:58 +0000 (07:42 +0000)]
sync

7 years agoAdd octciu(4) manual page.
visa [Sun, 2 Jul 2017 07:27:16 +0000 (07:27 +0000)]
Add octciu(4) manual page.

7 years agoEliminate multiple socket openings/closings and pass
krw [Sat, 1 Jul 2017 23:27:55 +0000 (23:27 +0000)]
Eliminate multiple socket openings/closings and pass
fd'd from main loops as required. One socket to do
ioctl's per process (called ioctlfd) and one socket to
do route messages per socket (called routefd).

Clean up local variable declaration lists in passing.

7 years agoactually remove these files
djm [Sat, 1 Jul 2017 22:55:44 +0000 (22:55 +0000)]
actually remove these files

7 years agoclose open fd after testing files, ensuring that fd isn't stdin.
brynet [Sat, 1 Jul 2017 21:07:13 +0000 (21:07 +0000)]
close open fd after testing files, ensuring that fd isn't stdin.

ok nicm@

7 years agoUse absolute pointers in codepatch entries
sf [Sat, 1 Jul 2017 19:42:59 +0000 (19:42 +0000)]
Use absolute pointers in codepatch entries

Instead of offsets to KERNBASE, store absolute pointers in the
codepatch entries. KERNBASE will go away when ASLR is introduced.

Requested by deraadt@

7 years agoUse absolute pointers in codepatch entries
sf [Sat, 1 Jul 2017 19:38:41 +0000 (19:38 +0000)]
Use absolute pointers in codepatch entries

Instead of offsets to KERNBASE, store absolute pointers in the
codepatch entries. This makes the resulting kernel a few KB larger on
amd64, but KERNBASE will go away when ASLR is introduced.

Requested by deraadt@

7 years agoprovide both TRAP and NOP values for our architectures, then change
deraadt [Sat, 1 Jul 2017 18:00:01 +0000 (18:00 +0000)]
provide both TRAP and NOP values for our architectures, then change
elf.sc to FILL .text segment with TRAP.  .init/.fini remain NOP FILL.

It is possible that some of these TRAP values aren't perfect yet, but
they can be changed.  When doing so also change the ld.script and gap.o
TRAP value.

discussions with mortimer, ok kettenis

7 years agoUpdate inteldrm(4) to code based on Linux 4.4.70. This brings us support for
kettenis [Sat, 1 Jul 2017 16:14:10 +0000 (16:14 +0000)]
Update inteldrm(4) to code based on Linux 4.4.70.  This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview.  Also
adds MST support.  Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.

7 years agoUpdate inteldrm(4) to code based on Linux 4.4.70. This brings us support for
kettenis [Sat, 1 Jul 2017 16:12:03 +0000 (16:12 +0000)]
Update inteldrm(4) to code based on Linux 4.4.70.  This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview.  Also
adds MST support.  Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.

7 years agoUpdate inteldrm(4) to code based on Linux 4.4.70. This brings us support for
kettenis [Sat, 1 Jul 2017 16:00:25 +0000 (16:00 +0000)]
Update inteldrm(4) to code based on Linux 4.4.70.  This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview.  Also
adds MST support.  Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.

7 years ago- Avoid possible use of uninitialized variable; noticed by jsg@
kevlo [Sat, 1 Jul 2017 15:56:11 +0000 (15:56 +0000)]
- Avoid possible use of uninitialized variable; noticed by jsg@
- Only set value in R92C_FAST_EDCA_CTRL register if the device is
  combo WiFi/Bluetooth; confirmed by Yan-Hsuan Chuan from Realtek
- There's no need to set the default value for the R92C_PIFS since
  default value is 0x1c; confirmed by Yan-Hsuan Chuan from Realtek
- Disable usb Rx aggregation mode for rtl8188cu/rtl8192cu;
  vendor drivers use DMA Rx aggregation mode for rtl8188cu/rtl8192cu/rtl8188eu
  and use USB Rx aggregation mode for later chipsets.

Tested by stsp and me.

ok stsp@

7 years agoeffectively kill depend as an independant target (there are a few corners
espie [Sat, 1 Jul 2017 14:41:54 +0000 (14:41 +0000)]
effectively kill depend as an independant target (there are a few corners
where a separate depend step is still needed, mostly gcc3 and mesa).

Use of BUILDFIRST is mostly enough to make sure important stuff is built
first.

Otherwise, this makes use of -M* compiler options to generate dependencies
on the fly.  There is a bit of behind-the-scene for targets with several
steps (like yacc and/or libraries) and the compiler needs extra hand-holding
with assembler files (don't know why, don't care).

Idea based on guenther@'s initial kernel work, loads of input from
drahn, aoyama, tb, etc.

okay tb@

"why wait" deraadt@

7 years agomissed BUILDFIRST. Allow stuff to proceed without depends
espie [Sat, 1 Jul 2017 14:37:25 +0000 (14:37 +0000)]
missed BUILDFIRST. Allow stuff to proceed without depends
as found by krw@

7 years agomagicfp is fclosed where it was opened, remove fclose from magic_load()
brynet [Sat, 1 Jul 2017 14:34:29 +0000 (14:34 +0000)]
magicfp is fclosed where it was opened, remove fclose from magic_load()

ok nicm deraadt

7 years agoremove post-SSHv1 removal dead code from rsa.c and merge the
djm [Sat, 1 Jul 2017 13:50:45 +0000 (13:50 +0000)]
remove post-SSHv1 removal dead code from rsa.c and merge the
remaining bit that it still used into ssh-rsa.c; ok markus

7 years agodelete -p options, the relevant parts are now covered by mandoc;
schwarze [Sat, 1 Jul 2017 13:17:09 +0000 (13:17 +0000)]
delete -p options, the relevant parts are now covered by mandoc;
OK jmc@

7 years agoWhen checking cross references with -Tlint, ultimately fall back to
schwarze [Sat, 1 Jul 2017 12:53:56 +0000 (12:53 +0000)]
When checking cross references with -Tlint, ultimately fall back to
looking in the current working directory.  Not a security issue
because the files are never open(2)ed, only access(2)ed.
Requested by jmc@ and inspired by mdoclint(1).

This cannot be perfect because it only works for files having the
exact filename ./pagename.sec - mandoc has no way to figure out
which files might contain a manual for multiple names, or that files
in autohell might be called ./pagename.man.in instead, or which
subdirectories might contain additional source files.  Also, it may
hide messages if you have bogus stuff lying around in the directory
where you run mandoc -Tlint.  But jmc@ considers it important, and
good enough for everyday use.

Also avoid leaking the memory for the file name while here.

7 years agogo thru POSIX::Termios to turn off kerninfo.
espie [Sat, 1 Jul 2017 12:23:22 +0000 (12:23 +0000)]
go thru POSIX::Termios to turn off kerninfo.
wasn't even aware that stuff existed, thanks nicm@

NOKERNINFO hardcoded, because it's not in the POSIX module, shouldn't be
a big issue.

okay millert@

7 years agoWhen checking the validity of cross references with -Tlint,
schwarze [Sat, 1 Jul 2017 12:00:12 +0000 (12:00 +0000)]
When checking the validity of cross references with -Tlint,
fall back from database search to file system search
just like man(1) does when looking up manuals.

This is not too expensive because on a system having up-to-date
mandoc.db(5) files, it only prolongs the time needed to check
*invalid* references - and you are supposed to have many of those,
right?  And on a system with missing or invalid mandoc.db(5) files,
spending a bit of time and warning loudly about the real problem
is also better than quickly issuing bogus warnings about cross
references that are actually valid.

7 years agoBasic reporting of .Xrs to manual pages that don't exist
schwarze [Sat, 1 Jul 2017 09:47:23 +0000 (09:47 +0000)]
Basic reporting of .Xrs to manual pages that don't exist
in the base system, inspired by mdoclint(1).

We are able to do this because (1) the -mdoc parser, the -Tlint validator,
and the man(1) manual page lookup code are all in the same program
and (2) the mandoc.db(5) database format allows fast lookup.

Feedback from, previous versions tested by, and OK jmc@.

A few features will be added to this in the tree, step by step.

7 years agoDon't write over right border.
nicm [Fri, 30 Jun 2017 22:37:35 +0000 (22:37 +0000)]
Don't write over right border.

7 years agoFix previous when we end up able to show no panes.
nicm [Fri, 30 Jun 2017 22:36:11 +0000 (22:36 +0000)]
Fix previous when we end up able to show no panes.

7 years agoTry to show a better preview of sessions and windows in tree mode.
nicm [Fri, 30 Jun 2017 22:24:08 +0000 (22:24 +0000)]
Try to show a better preview of sessions and windows in tree mode.

7 years agoImprove reorder_kernel()
rpe [Fri, 30 Jun 2017 17:06:03 +0000 (17:06 +0000)]
Improve reorder_kernel()

- check for and exit if /usr/share is on a nfs mounted filesystem
- add trap handlers that mail the logfile to the admin user
- use $_compile instead of $_compile_dir like in the installer
- use $_compile/$_kernel instead of $_kernel_dir
- remove the now redundant sha256 -h ... after make newinstall
- write stdout/stderr of the background subshell to a logfile

OK tb@ deraadt@

7 years agoCreate a unique kernel to boot from during install and upgrade.
rpe [Fri, 30 Jun 2017 16:46:02 +0000 (16:46 +0000)]
Create a unique kernel to boot from during install and upgrade.

- update the linkkit directory
- chroot and relink/install new kernel using the linkkit Makefile

Idea from and OK deraadt@
OK tb@

7 years agoBuild and run libexpat regress tests from src/lib/libexpat/tests.
bluhm [Fri, 30 Jun 2017 14:56:08 +0000 (14:56 +0000)]
Build and run libexpat regress tests from src/lib/libexpat/tests.

7 years agoAdd test suite source files for expat 2.2.1.
bluhm [Fri, 30 Jun 2017 14:43:26 +0000 (14:43 +0000)]
Add test suite source files for expat 2.2.1.

7 years agoAdd mdoc(7) macros to vi's built-in lists of roff paragraph/section macros.
bentley [Fri, 30 Jun 2017 14:42:05 +0000 (14:42 +0000)]
Add mdoc(7) macros to vi's built-in lists of roff paragraph/section macros.

ok jmc@, no objection schwarze@

7 years agoAmigaOS and pre-X Mac OS support has been dropped in upstream
bluhm [Fri, 30 Jun 2017 13:25:02 +0000 (13:25 +0000)]
AmigaOS and pre-X Mac OS support has been dropped in upstream
libexpat.  Remove obsolete header files, missed in previous commit.

7 years agoIn OpenBSD 6.0 we had the check (ip6_forward_rt.ro_tableid !=
bluhm [Fri, 30 Jun 2017 11:29:15 +0000 (11:29 +0000)]
In OpenBSD 6.0 we had the check (ip6_forward_rt.ro_tableid !=
m->m_pkthdr.ph_rtableid) after going to reroute in ip6_forward().
As this had been lost during refactoring, the old route was used
after pf has changed the routing table.  Solution is to reset the
route, then it is not valid and will be reallocated.
from markus@; OK mpi@