dragonfly.git
6 years agolibfetch: Suppress fallthrough warning.
zrj [Sun, 28 Jan 2018 14:44:03 +0000 (16:44 +0200)]
libfetch: Suppress fallthrough warning.

6 years agoPrefer https over http in commit template
Eitan Adler [Sun, 28 Jan 2018 05:34:46 +0000 (21:34 -0800)]
Prefer https over http in commit template

6 years agoShifting into or out of an int's sign bit is undefined, and this loop
Eitan Adler [Sun, 28 Jan 2018 05:33:16 +0000 (21:33 -0800)]
Shifting into or out of an int's sign bit is undefined, and this loop
deterministically and intentionally does both.

Dragonfly-bug: https://bugs.dragonflybsd.org/issues/3112
Submitted-by: "mmcc"
6 years agobus_dma.9: Add a few lines about bus_dmamap_load_ccb().
Sascha Wildner [Sat, 27 Jan 2018 10:14:56 +0000 (11:14 +0100)]
bus_dma.9: Add a few lines about bus_dmamap_load_ccb().

While doing, add a comment to the function.

6 years ago<sys/cdefs.h>: Add __alloc_size2() for functions taking number and size.
Sascha Wildner [Fri, 26 Jan 2018 22:07:34 +0000 (23:07 +0100)]
<sys/cdefs.h>: Add __alloc_size2() for functions taking number and size.

Add it to calloc().

Pointed-out-by: zrj
6 years ago<sys/cdefs.h>: Make __nonnull variadic.
Sascha Wildner [Fri, 26 Jan 2018 17:20:15 +0000 (18:20 +0100)]
<sys/cdefs.h>: Make __nonnull variadic.

Make use of it in the remaining __nonnull decorations we have.

6 years agolvm(8): Add line editing support (libedit is already linked).
Sascha Wildner [Fri, 26 Jan 2018 17:16:50 +0000 (18:16 +0100)]
lvm(8): Add line editing support (libedit is already linked).

6 years agolibedit: Check dereferenced pointer for NULL.
zrj [Fri, 26 Jan 2018 12:37:37 +0000 (14:37 +0200)]
libedit: Check dereferenced pointer for NULL.

Already fixed in NetBSD.

Caught-by: gcc80 -Wpointer-compare
6 years agoFix two more gcc80 -Wsizeof-pointer-memaccess warnings.
Sascha Wildner [Wed, 24 Jan 2018 18:00:19 +0000 (19:00 +0100)]
Fix two more gcc80 -Wsizeof-pointer-memaccess warnings.

6 years agopppctl(8): Avoid overlapping strcpy() copies.
zrj [Wed, 24 Jan 2018 16:07:37 +0000 (18:07 +0200)]
pppctl(8): Avoid overlapping strcpy() copies.

Use intermediate.

6 years agotelnet(1): Avoid overlapping strncpy() copies.
zrj [Wed, 24 Jan 2018 15:34:34 +0000 (17:34 +0200)]
telnet(1): Avoid overlapping strncpy() copies.

The cmdrc() is shifting string to the left, use temporary.

While there, do some constification.

6 years agopax(1): Honour the restrict in sigaction().
zrj [Wed, 24 Jan 2018 14:07:16 +0000 (16:07 +0200)]
pax(1): Honour the restrict in sigaction().

Use a setup_sig() helper and make it fail when either of sigaction fails.

While there, do not leak fds for "." + minor cleanup.

Taken-from: OpenBSD

6 years agodd(1): Use a local swapbytes() function.
zrj [Wed, 24 Jan 2018 13:47:40 +0000 (15:47 +0200)]
dd(1): Use a local swapbytes() function.

The swab(3) has restrict qualifiers for src and dst.
Avoid relying on undefined overlapping swab behavior.

Taken-from: OpenBSD

6 years agomille(6): General cleanup.
zrj [Wed, 24 Jan 2018 12:33:56 +0000 (14:33 +0200)]
mille(6): General cleanup.

  * Constification.
  * Braces.
  * Do not use increments/decrements on booleans.
  * Add few missing fallthrough.

6 years agopf: Fix bzero() argument.
zrj [Wed, 24 Jan 2018 08:48:08 +0000 (10:48 +0200)]
pf: Fix bzero() argument.

Intention here is to zero out the local pfioc_trans structure and not the
char *t puinter.

Caught-by: gcc80 -Wstringop-overflow
6 years agoktrdump(8): Fix bzero() argument on error.
zrj [Wed, 24 Jan 2018 08:25:59 +0000 (10:25 +0200)]
ktrdump(8): Fix bzero() argument on error.

Intention here is to zero out the struct and not the local pointer,
based on change in e7c0dbbaa.

Caught-by: gcc80 -Wstringop-overflow
6 years agovinum(8): Allow for terminating NULL.
zrj [Wed, 24 Jan 2018 07:57:06 +0000 (09:57 +0200)]
vinum(8): Allow for terminating NULL.

Mainly to suppress -Wstringop-overflow warning.

6 years agocvs(1): Avoid -Wstringop-overflow warning.
zrj [Wed, 24 Jan 2018 07:42:17 +0000 (09:42 +0200)]
cvs(1): Avoid -Wstringop-overflow warning.

The cvs will terminate after calling it's error(1, ...) but it can not be
marked as noreturn. So just add a hint for compiler that memcmp() with
read1 == -1 as an argument is not reachable.

6 years agoFix gcc80 -Wbool-operation warnings in fortune(6) and hack(6).
Sascha Wildner [Wed, 24 Jan 2018 08:32:42 +0000 (09:32 +0100)]
Fix gcc80 -Wbool-operation warnings in fortune(6) and hack(6).

6 years agoFix a number of gcc80 -Wsizeof-pointer-memaccess warnings.
Sascha Wildner [Wed, 24 Jan 2018 08:26:05 +0000 (09:26 +0100)]
Fix a number of gcc80 -Wsizeof-pointer-memaccess warnings.

The file is reused in various utilities.

However, the mid- to long-term plan is to remove legacy utmp code and
only go with standard utmpx.

6 years agognu/lib: Raise WARNS generally to 1 via Makefile.inc.
Sascha Wildner [Tue, 23 Jan 2018 20:19:57 +0000 (21:19 +0100)]
gnu/lib: Raise WARNS generally to 1 via Makefile.inc.

6 years agolibm: Avoid left-shifting negative integers.
zrj [Tue, 23 Jan 2018 18:19:13 +0000 (20:19 +0200)]
libm: Avoid left-shifting negative integers.

It is undefined behaviour.

Taken-from: OpenBSD

6 years agoipfw: Avoid left-shifting negative integers.
zrj [Tue, 23 Jan 2018 18:11:47 +0000 (20:11 +0200)]
ipfw: Avoid left-shifting negative integers.

It is undefined behaviour.

While there, mark one fallthrough case.

6 years agogames: Fix -Wint-in-bool-context warnings.
zrj [Tue, 23 Jan 2018 17:48:45 +0000 (19:48 +0200)]
games: Fix -Wint-in-bool-context warnings.

These cases were the last two in base.

6 years agobinutils227: Fix comparison of pointer against char.
zrj [Tue, 23 Jan 2018 16:20:21 +0000 (18:20 +0200)]
binutils227: Fix comparison of pointer against char.

Backport from upstream.

6 years agobinutils225: Fix comparison of pointer against char.
zrj [Tue, 23 Jan 2018 16:19:44 +0000 (18:19 +0200)]
binutils225: Fix comparison of pointer against char.

Backport from upstream.

While there, deal with -Wshift-overflow in aarch64.cc (unused).

6 years agogdb: Fix wrong comparison of pointer against char.
zrj [Tue, 23 Jan 2018 16:19:10 +0000 (18:19 +0200)]
gdb: Fix wrong comparison of pointer against char.

Backport from upstream.

6 years agoOops, fix up my previous commit properly.
Sascha Wildner [Tue, 23 Jan 2018 10:40:29 +0000 (11:40 +0100)]
Oops, fix up my previous commit properly.

6 years agoFix gcc80 -Wmultistatement-macros.
Sascha Wildner [Tue, 23 Jan 2018 09:13:06 +0000 (10:13 +0100)]
Fix gcc80 -Wmultistatement-macros.

6 years agogcc50/Makefile.inc: Add newline at EOF.
Sascha Wildner [Tue, 23 Jan 2018 08:01:40 +0000 (09:01 +0100)]
gcc50/Makefile.inc: Add newline at EOF.

6 years agoRevert "terminfo: Add xterm-termite to Makefile.entries"
Markus Pfeiffer [Mon, 22 Jan 2018 20:27:13 +0000 (20:27 +0000)]
Revert "terminfo: Add xterm-termite to Makefile.entries"

This reverts commit 5f4713d27c03fbf254d1d7e9939f9864261337b6.

6 years agognu/sbin: Raise WARNS generally to 1 via Makefile.inc.
Sascha Wildner [Mon, 22 Jan 2018 17:47:48 +0000 (18:47 +0100)]
gnu/sbin: Raise WARNS generally to 1 via Makefile.inc.

6 years agogcc50/libgcov: Fix whitespace in Makefile.
Sascha Wildner [Mon, 22 Jan 2018 16:50:40 +0000 (17:50 +0100)]
gcc50/libgcov: Fix whitespace in Makefile.

6 years agoRevert "kernel: Disable attributes that take no effect."
zrj [Mon, 22 Jan 2018 16:23:09 +0000 (18:23 +0200)]
Revert "kernel: Disable attributes that take no effect."

This reverts commit 191430ddf0486f992e75ff14effbb5a69e1da2bd.

Needs more checking.

6 years agosbin/mount_autofs: Add description
Tomohiro Kusumi [Mon, 22 Jan 2018 15:29:46 +0000 (17:29 +0200)]
sbin/mount_autofs: Add description

TL;DR users won't be running this command to mount autofs.

Having autofs_enable=YES won't run this command either.
There is a high level command automount(8) and that does everything
based on /etc/auto_master contents.

mount_autofs(8) is a low level version where users can manually
specify things automount(8) internally passes to mount(2).
Thus it's not easy or needed to understand what -fOp options exactly
do without having clear understanding of autofs internal.
But I'll write it here in case interested.

 -f is a string which eventually gets copied to statfs::f_mntfromname.
  Unlike most of the filesystems with backing store, this is just
  a label to identify the autofs mount.
 -O is mount options of autofs(5).
 -p is a prefix string to distinct direct and indirect mapping.

6 years agoFix some -Wunused-const-variable warnings and a -Wmisleading-indentation.
Sascha Wildner [Mon, 22 Jan 2018 12:59:27 +0000 (13:59 +0100)]
Fix some -Wunused-const-variable warnings and a -Wmisleading-indentation.

6 years agodconschat(8): Put the fflush() under 'verbose' too.
Sascha Wildner [Mon, 22 Jan 2018 12:44:12 +0000 (13:44 +0100)]
dconschat(8): Put the fflush() under 'verbose' too.

6 years agodconschat(8): Fix -Wmisleading-indentation.
Sascha Wildner [Mon, 22 Jan 2018 12:37:19 +0000 (13:37 +0100)]
dconschat(8): Fix -Wmisleading-indentation.

6 years agoFix one last -Wnonnull-compare in m4(1).
Sascha Wildner [Mon, 22 Jan 2018 12:31:51 +0000 (13:31 +0100)]
Fix one last -Wnonnull-compare in m4(1).

6 years agoFix gcc80 -Wnonnull-compare.
Sascha Wildner [Mon, 22 Jan 2018 12:26:58 +0000 (13:26 +0100)]
Fix gcc80 -Wnonnull-compare.

For arguments that are checked against NULL in the function, we don't
want a nonnull attribute, because that will cause the NULL check to be
optimized away in higher -O levels and it will also trigger a
-Wnonnull-compare warning.

See also 0f037c78525bfb7df49de8338826e15137859b1d commit message.

6 years agolib/i18n_module: Add a missing break.
Sascha Wildner [Sun, 21 Jan 2018 21:13:30 +0000 (22:13 +0100)]
lib/i18n_module: Add a missing break.

It is intended and correct, but has no correctness implications due
to is94 => is96.

Confirmed-by: cem@freebsd, eadler@freebsd
6 years agorcs: Fix gcc80 warnings (-Wdangling-else and -Wmisleading-indentation).
Sascha Wildner [Sun, 21 Jan 2018 21:03:35 +0000 (22:03 +0100)]
rcs: Fix gcc80 warnings (-Wdangling-else and -Wmisleading-indentation).

6 years agohammer2: Remove duplicate initialialization of fields.
zrj [Sun, 21 Jan 2018 18:37:20 +0000 (20:37 +0200)]
hammer2: Remove duplicate initialialization of fields.

Avoids -Woverride-init diagnostics.

While there, minor whitespace cleanup.

6 years agokernel: Disable few nonnull attributes.
zrj [Sun, 21 Jan 2018 18:31:01 +0000 (20:31 +0200)]
kernel: Disable few nonnull attributes.

To avoid -Wnonnull-compare, similarly as in:
0f037c78525bfb7df49de8338826e15137859b1d

devfs_core.c:   devfs_find_device_by_name()
1st arg checked (NULL == return)
kern_slaballoc.c: kfree()
1st arg checked (NULL == panic)
2nd arg not checked
kern_synch.c:   tsleep()
1st arg checked (NULL == KASSERT)
subr_prf.c: kvcprintf()
1st arg checked (NULL == "(fmt null)")
subr_sbuf.c: sbuf_vprintf()
2nd arg checked (NULL == KASSERT)

6 years agokernel/bus: Avoid panic on NULL passed to kfree().
zrj [Sun, 21 Jan 2018 15:56:58 +0000 (17:56 +0200)]
kernel/bus: Avoid panic on NULL passed to kfree().

Our kfree() will issue panic() on NULL pointer.

Caught-by: gcc80 -Wnonnull
6 years agokernel/ipsec: Avoid -Warray-bounds warning.
zrj [Sun, 21 Jan 2018 15:32:21 +0000 (17:32 +0200)]
kernel/ipsec: Avoid -Warray-bounds warning.

Just panic if something else than 0, 1 or 2 is passed.

6 years agokernel/ipsec: Fix useless m_pkthdr.len check.
zrj [Sun, 21 Jan 2018 15:02:22 +0000 (17:02 +0200)]
kernel/ipsec: Fix useless m_pkthdr.len check.

Compare it against sadb_msg.

Caught-by: gcc80 -Wtautological-compare
6 years agoig_hal: Reindent e1000_ich8lan.c a bit.
zrj [Sun, 21 Jan 2018 14:34:47 +0000 (16:34 +0200)]
ig_hal: Reindent e1000_ich8lan.c a bit.

No functional change.

6 years agoipfw3_nat: Reindent switch cases.
zrj [Sun, 21 Jan 2018 14:15:34 +0000 (16:15 +0200)]
ipfw3_nat: Reindent switch cases.

No functional change.

While there, make add_redir_spool_cfg() and del_redir_spool_cfg() static.

6 years agokernel: Disable attributes that take no effect.
zrj [Sun, 21 Jan 2018 12:46:14 +0000 (14:46 +0200)]
kernel: Disable attributes that take no effect.

Both gcc50 and gcc80 ignore these attributes:
warning: ignoring attribute 'aligned' because it conflicts with attribute 'packed' [-Wattributes]
No differences for final objects.

6 years agonetgraph: Disable unused structs.
zrj [Sun, 21 Jan 2018 11:42:15 +0000 (13:42 +0200)]
netgraph: Disable unused structs.

This needs recheck.

While there, document that musycc and if_mn requires netgraph and
are not compatible with netgraph7.

6 years agousr.sbin/autofs: Drop unneeded header include
Tomohiro Kusumi [Sun, 21 Jan 2018 17:49:56 +0000 (19:49 +0200)]
usr.sbin/autofs: Drop unneeded header include

common.c has no dependency on autofs api itself.

6 years agoSync zoneinfo database with tzdata2018b from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sun, 21 Jan 2018 11:02:04 +0000 (12:02 +0100)]
Sync zoneinfo database with tzdata2018b from ftp://ftp.iana.org/tz/releases

* Sao Tome and Principe switched from +00 to +01.

* Brazil's DST will now start on November's first Sunday.

* A discrepancy of 4 s in timestamps before 1931 in South Sudan has
    been corrected.

* The abbreviation invented for Bolivia Summer Time (1931-2) is now
    BST instead of BOST.

* Various smaller adjustments.

For a detailed list of changes, see share/zoneinfo/NEWS.

6 years agolimit(1): fix always true condition
Eitan Adler [Sun, 21 Jan 2018 09:01:26 +0000 (01:01 -0800)]
limit(1): fix always true condition

6 years agodrm/i915: Backport fix for a bad bitmask.
zrj [Sat, 20 Jan 2018 19:32:42 +0000 (21:32 +0200)]
drm/i915: Backport fix for a bad bitmask.

No-op, we explictly disable stolen memory in i915_gem_init_stolen().

6 years agocpdup - Additional fixes for -X absolute_path
Matthew Dillon [Sun, 21 Jan 2018 06:51:38 +0000 (22:51 -0800)]
cpdup - Additional fixes for -X absolute_path

* When an absolute path is specified the file is connsidered
  to be local to the machine and is not opened on a remote
  source.

6 years agohammer2 - Correct ip->cluster.nchains gap filler
Matthew Dillon [Sun, 21 Jan 2018 05:51:48 +0000 (21:51 -0800)]
hammer2 - Correct ip->cluster.nchains gap filler

* Fix a bug where gaps in the cluster array were not being
  properly filled.  This is only applicable to clusters
  consisting of more than one element, which we do not
  officially support yet.

Reported-by: zrj (gcc80 found it)
6 years agocpdup - Enhance -X operation
Matthew Dillon [Sun, 21 Jan 2018 05:47:01 +0000 (21:47 -0800)]
cpdup - Enhance -X operation

* Enhance -X operation.  When the cpignore file is specified as an
  absolute path, it may contain wildcards which match against the
  concatenated source path and directory element (as specified in the
  source), instead of just match against directory elements.

* Thus an absolute cpignore file may contain full paths and wildcards.
  For example, if you:

  cpdup -X $cwd/mycpignore /tmp /fubar

  And $cwd/mycpignore (specified with an absolute path) contains:

      /tmp/xyz/swap*

  Then cpdup will not copy files that match against /tmp/xyz/swap*.

  If you specify a relative path for the cpignore file, or use the
  -x option (instead of -X cpignorefile), operation remains as before
  and only matches against the directory element.

6 years ago{bs,quiz}(6): Compare pointers with NULL, not '\0'.
Sascha Wildner [Sat, 20 Jan 2018 23:22:27 +0000 (00:22 +0100)]
{bs,quiz}(6): Compare pointers with NULL, not '\0'.

6 years agodrm/radeon: Disable few unused const arrays.
zrj [Sat, 20 Jan 2018 17:26:41 +0000 (19:26 +0200)]
drm/radeon: Disable few unused const arrays.

No functional change.

6 years agoLINT64: Cleanup for -Wunused-const-variable.
zrj [Sat, 20 Jan 2018 17:22:13 +0000 (19:22 +0200)]
LINT64: Cleanup for -Wunused-const-variable.

6 years agosound/hda: Disable hdac_pcie_snoop struct.
zrj [Sat, 20 Jan 2018 17:17:25 +0000 (19:17 +0200)]
sound/hda: Disable hdac_pcie_snoop struct.

It is currently unused.

6 years agokernel/mpt: Fix evaluation of args in macro.
zrj [Sat, 20 Jan 2018 17:15:45 +0000 (19:15 +0200)]
kernel/mpt: Fix evaluation of args in macro.

6 years agokernel/ncr: Remove unused variable.
zrj [Sat, 20 Jan 2018 17:08:09 +0000 (19:08 +0200)]
kernel/ncr: Remove unused variable.

6 years agokernel/isp: Minor cleanup.
zrj [Sat, 20 Jan 2018 17:06:01 +0000 (19:06 +0200)]
kernel/isp: Minor cleanup.

Remove unused string and use 'rqo' only if ISP_TARGET_MODE.

6 years ago<sys/ktr.h>: Use empty macros for non KTR case.
zrj [Sat, 20 Jan 2018 16:59:46 +0000 (18:59 +0200)]
<sys/ktr.h>: Use empty macros for non KTR case.

Cleans up the gcc80 -Wunused-const-variable warnings.

6 years agokernel/pf: Remove an unused variable.
Sascha Wildner [Sat, 20 Jan 2018 18:58:51 +0000 (19:58 +0100)]
kernel/pf: Remove an unused variable.

6 years agoterminfo: Add xterm-termite to Makefile.entries
Markus Pfeiffer [Sat, 20 Jan 2018 13:59:53 +0000 (13:59 +0000)]
terminfo: Add xterm-termite to Makefile.entries

6 years agotermcap: Add xterm-termite
Markus Pfeiffer [Sat, 20 Jan 2018 11:58:18 +0000 (11:58 +0000)]
termcap: Add xterm-termite

6 years agodrm/linux: Improve linux/log2.h
zrj [Sat, 20 Jan 2018 10:29:06 +0000 (12:29 +0200)]
drm/linux: Improve linux/log2.h

With newer GCC compilers it is no longer possible to easily detect bad
cases of ilog2() usage in drm shim, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785

There is just a single use case of this macro in drm/radeon/radeon_device.c
for radeon_vm_size, it is already checked to be positive 2^N small number.
So simplify macro and just return 0 for n < 2.

While there, adjust logic to use proper fls(3) and flsll(3) functions
based on integer size (previously both cases where calling flsl(3)).

6 years agoFix few typos.
zrj [Sat, 20 Jan 2018 09:17:16 +0000 (11:17 +0200)]
Fix few typos.

Spotted-by: swildner
6 years agolimits(1): Add missing 'break'.
Sascha Wildner [Sat, 20 Jan 2018 10:48:46 +0000 (11:48 +0100)]
limits(1): Add missing 'break'.

6 years agoktrdump(8): Fix wrongly placed 'break' for floating point unpacking.
Sascha Wildner [Sat, 20 Jan 2018 10:37:04 +0000 (11:37 +0100)]
ktrdump(8): Fix wrongly placed 'break' for floating point unpacking.

6 years agogzip(1): Add some __attribute__((__noreturn__)).
Sascha Wildner [Sat, 20 Jan 2018 10:28:22 +0000 (11:28 +0100)]
gzip(1): Add some __attribute__((__noreturn__)).

6 years agopam_exec(8): Raise WARNS to 3.
Sascha Wildner [Sat, 20 Jan 2018 09:05:45 +0000 (10:05 +0100)]
pam_exec(8): Raise WARNS to 3.

6 years agofsdb(8): Fix some -Wformat warnings and raise WARNS to 2.
Sascha Wildner [Sat, 20 Jan 2018 08:37:51 +0000 (09:37 +0100)]
fsdb(8): Fix some -Wformat warnings and raise WARNS to 2.

6 years agoumount(8): Add missing braces.
Sascha Wildner [Sat, 20 Jan 2018 08:07:57 +0000 (09:07 +0100)]
umount(8): Add missing braces.

6 years agomfiutil(8): Remove -fno-builtin-strftime from CFLAGS.
Sascha Wildner [Fri, 19 Jan 2018 19:13:06 +0000 (20:13 +0100)]
mfiutil(8): Remove -fno-builtin-strftime from CFLAGS.

We don't need this.

6 years agoProvide __{printf,scanf,strfmon,strftime}like() for builtin functions too.
Sascha Wildner [Fri, 19 Jan 2018 19:11:33 +0000 (20:11 +0100)]
Provide __{printf,scanf,strfmon,strftime}like() for builtin functions too.

We want our formats checked in -fno-builtin builds as well.

6 years agobsd.sys.mk: Set -Werror only for compilers that have the warnings fixed.
Sascha Wildner [Fri, 19 Jan 2018 12:23:47 +0000 (13:23 +0100)]
bsd.sys.mk: Set -Werror only for compilers that have the warnings fixed.

This reverts part of b399af1115fa4d2d29e5b5e59eb3a5c3087dccda.

6 years agobsd.{sys,kern}.mk: Apply warning restrictions for future GCCs.
Sascha Wildner [Mon, 31 Jul 2017 19:28:21 +0000 (21:28 +0200)]
bsd.{sys,kern}.mk: Apply warning restrictions for future GCCs.

6 years agoAdd __attribute__((__noreturn__)) to a number of usage() like functions.
Sascha Wildner [Fri, 19 Jan 2018 10:16:52 +0000 (11:16 +0100)]
Add __attribute__((__noreturn__)) to a number of usage() like functions.

These were not caught in the -Wsuggest-attribute=noreturn cleanup
because they were already static at that point. There are likely
more such cases but I don't know how to find them systematically.

6 years agoed(1): Add three __attribute__((__noreturn__)).
Sascha Wildner [Fri, 19 Jan 2018 09:19:26 +0000 (10:19 +0100)]
ed(1): Add three __attribute__((__noreturn__)).

I had missed them in a31274954f5c10e5a80969dcfc719d665f36a26c.

6 years agopfctl(8): Fix two wrong conditions.
Sascha Wildner [Fri, 19 Jan 2018 09:09:09 +0000 (10:09 +0100)]
pfctl(8): Fix two wrong conditions.

Caught by gcc80's -Wtautological-compare option.

6 years agolibthread_xu: Fix issues detected by gcc80.
Sascha Wildner [Fri, 19 Jan 2018 08:55:59 +0000 (09:55 +0100)]
libthread_xu: Fix issues detected by gcc80.

The changes to <pthread.h> all deal with -Wnonnull-compare warnings,
which are issued when a function has a NULL check for a parameter that
at the same time is marked with __attribute__((nonnull(...))), aka
__nonnull(...).

Such __nonnull() decoration only ever catches those cases where NULL is
passed directly to the function, but not any more indirect ways. What
makes matters worse is that in higher optimization levels (-O >= 2),
GCC will happily optimize out any NULL checks within the function for
these parameters.

This means that __nonnull() is generally inferior to a direct NULL check
in the function itself and if we have both, which newer GCCs warn about
with -Wnonnull-compare (that is part of -Wall), we should remove the
__nonnull().

This commit does that for all parameters which our libthread_xu checks
directly in the function. What remains are __nonnull() for parameters
which are _not_ checked in the functions, to at least catch cases where
NULL is passed directly. We should think about adding real checks for
those parameters too.

While here, add a "/* FALLTHROUGH */" comment in thr_printf.c which
fixes a -Wimplicit-fallthrough warning.

6 years agomfiutil(8): Use MAN instead of MAN8.
Sascha Wildner [Thu, 18 Jan 2018 17:34:30 +0000 (18:34 +0100)]
mfiutil(8): Use MAN instead of MAN8.

6 years agoRevert "bsd.sys.mk: support -Wunused-local-typedef"
Sascha Wildner [Thu, 18 Jan 2018 13:35:43 +0000 (14:35 +0100)]
Revert "bsd.sys.mk: support -Wunused-local-typedef"

This reverts commit 14683bdb9c1d41c0d62dc7d11f3fd535973ad258.

It is no longer needed after 6954d52dca31dc7773729c0bf92e14fb1dab5aae.

6 years agogcc50: Move out manpage version handling.
zrj [Thu, 18 Jan 2018 05:27:51 +0000 (07:27 +0200)]
gcc50: Move out manpage version handling.

The Makefile.cco should only affect global ones.

6 years agogcc47: Move out manpage version handling.
zrj [Thu, 18 Jan 2018 05:26:06 +0000 (07:26 +0200)]
gcc47: Move out manpage version handling.

The Makefile.cco should only affect global ones.

6 years agocorepower - Add kabylake support
Matthew Dillon [Wed, 17 Jan 2018 21:30:57 +0000 (13:30 -0800)]
corepower - Add kabylake support

* Add kabylake support (just the id needed)

6 years agoetc/remote: Fix ucom[234].
Sascha Wildner [Wed, 17 Jan 2018 12:30:12 +0000 (13:30 +0100)]
etc/remote: Fix ucom[234].

6 years agokernel/evdev: Whitespace correction in input-event-codes.h
Peeter Must [Wed, 17 Jan 2018 09:32:13 +0000 (11:32 +0200)]
kernel/evdev: Whitespace correction in input-event-codes.h

6 years agokernel/evdev: Update input-event-codes.h
Peeter Must [Wed, 17 Jan 2018 08:48:52 +0000 (10:48 +0200)]
kernel/evdev: Update input-event-codes.h

Taken-from: Linux

6 years agoipfw: Add icmpcodes support.
Sepherosa Ziehau [Tue, 16 Jan 2018 05:07:14 +0000 (13:07 +0800)]
ipfw: Add icmpcodes support.

6 years agokernel - Fix busdma allocation bug
Matthew Dillon [Tue, 16 Jan 2018 00:42:00 +0000 (16:42 -0800)]
kernel - Fix busdma allocation bug

* Fix a bug where kmalloc() could be used to allocate DMA memory
  that the caller intends to be non-cacheable.

  If a non-cacheable tag is specified, bus_dma now uses contigmalloc.

* Use the bus_dmamap_t pointer to differentiate between kmalloc
  and contigmalloc allocated memory, instead of running tag tests.

  This is a bit of a hack, but its the easiest solution.

6 years agokernel - xhci cleanup, lock attach
Matthew Dillon [Tue, 16 Jan 2018 00:40:31 +0000 (16:40 -0800)]
kernel - xhci cleanup, lock attach

* Lock xhci during attach to avoid spurious interrupts from
  hitting the interrupt routine too early.

* Install interrupt after controller startup, but before
  the main usb code begins querying it.

* Cleanup syntax

6 years agokernel - Add a global priority hack for ACPI
Matthew Dillon [Tue, 16 Jan 2018 00:37:35 +0000 (16:37 -0800)]
kernel - Add a global priority hack for ACPI

* Allows ACPI to fully probe and attach all acpi devices before
  attaching any non-ACPI devices.

* May improve device attach stability.

* Currently only implemented at the top-level of the acpi
  device tree.

6 years agokernel - Handle ig4 controller startup errors
Matthew Dillon [Tue, 16 Jan 2018 00:34:06 +0000 (16:34 -0800)]
kernel - Handle ig4 controller startup errors

* Fail the attach on controller startup errors.  For some reason the
  dell xps 13 says there's I2C controller, but the controller appears
  to be permanente disabled and will refuse to enable.

6 years agocpucontrol - Add amd10h support
Matthew Dillon [Tue, 16 Jan 2018 00:28:21 +0000 (16:28 -0800)]
cpucontrol - Add amd10h support

* Add support for ryzen and later microcodes.

* Adds general support for AMD microcodes in their
  packed format.  No need to unpack AMD microcode any
  more, cpucontrol will parse the distribution file
  from AMD.

Taken-from: FreeBSD

6 years agokernel: Add acpi and a number of related drivers to our default config.
Sascha Wildner [Mon, 15 Jan 2018 18:43:39 +0000 (19:43 +0100)]
kernel: Add acpi and a number of related drivers to our default config.

These are: gpio_acpi, gpio_intel, smbus and smbacpi. Leave
ichiic (aka ig4) commented out for now because it seems to have
issues with latest generation Intel CPUs.

Adjust the manual page a bit and remove an obsolete comment in LINT64.

In-discussion-with: dillon, ivadasz