dragonfly.git
14 months ago<time.h>: Provide time2posix(), posix2time() prototypes.
Sascha Wildner [Sat, 13 Apr 2019 22:40:01 +0000 (00:40 +0200)]
<time.h>: Provide time2posix(), posix2time() prototypes.

They have a manual page too. Also provide offtime() and timeoff()
prototypes.

Fixes some -Wmissing-prototypes warnings.

14 months agoUpdate the pciconf(8) database.
Sascha Wildner [Tue, 16 Apr 2019 06:55:41 +0000 (08:55 +0200)]
Update the pciconf(8) database.

April 12, 2019 snapshot from https://pci-ids.ucw.cz

14 months agogcc80: Document -save-temps=objects addition.
zrj [Tue, 16 Apr 2019 04:15:47 +0000 (07:15 +0300)]
gcc80: Document -save-temps=objects addition.

14 months agogcc80: Update manpages.
zrj [Tue, 16 Apr 2019 03:38:32 +0000 (06:38 +0300)]
gcc80: Update manpages.

14 months agoAdjust makefiles for GCC80 update.
zrj [Tue, 16 Apr 2019 02:43:32 +0000 (05:43 +0300)]
Adjust makefiles for GCC80 update.

14 months agoMerge remote-tracking branch 'origin/vendor/GCC80'
zrj [Tue, 16 Apr 2019 03:28:06 +0000 (06:28 +0300)]
Merge remote-tracking branch 'origin/vendor/GCC80'

14 months agoBring in branch-8 bugfixes into GCC80. vendor/GCC80
zrj [Tue, 16 Apr 2019 02:39:06 +0000 (05:39 +0300)]
Bring in branch-8 bugfixes into GCC80.

Bugfixes as of April 15.
Huge thanks to gcc developers for keeping longterm branches and
backporting/testing all the bugfixes.

14 months agoUpdate GCC80 to version 8.3
zrj [Tue, 16 Apr 2019 02:37:34 +0000 (05:37 +0300)]
Update GCC80 to version 8.3

14 months agobsd.lib.mk: Fix SHLIB_LINK handling.
zrj [Mon, 15 Apr 2019 17:37:14 +0000 (20:37 +0300)]
bsd.lib.mk: Fix SHLIB_LINK handling.

Checks should be for TARGETs. Also .so should be created in LIBDIR version.

No functional change intended on master.

14 months agogcc80: Make LTO plugins installation consistent.
zrj [Mon, 15 Apr 2019 17:33:42 +0000 (20:33 +0300)]
gcc80: Make LTO plugins installation consistent.

Previously my LTO additions were (ab)using bug in bsd.lib.mk.
All other cases in world override both variables.
Do the same fix for gcc47 too.

No functional change intended.

14 months agolibc: Adjust HISTORY sections in a few recently added manual pages.
Sascha Wildner [Sun, 14 Apr 2019 10:58:07 +0000 (12:58 +0200)]
libc: Adjust HISTORY sections in a few recently added manual pages.

15 months agotimingsafe_bcmp.3: Add missing .Lb.
Sascha Wildner [Sun, 14 Apr 2019 01:06:43 +0000 (03:06 +0200)]
timingsafe_bcmp.3: Add missing .Lb.

15 months agoPRIV: Add transitional handling in bsd.lib.mk.
zrj [Fri, 12 Apr 2019 13:03:44 +0000 (16:03 +0300)]
PRIV: Add transitional handling in bsd.lib.mk.

Allow certain versioned private libraries to be installed into public
libraries directory. PRIVATELIB libraries already have mangled names.

15 months agoPRIV: Add helper tool.
zrj [Fri, 12 Apr 2019 07:55:29 +0000 (10:55 +0300)]
PRIV: Add helper tool.

To speed up vendor updates.

15 months agofactor(6): Convert to BN_is_prime_ex().
zrj [Fri, 12 Apr 2019 07:51:56 +0000 (10:51 +0300)]
factor(6): Convert to BN_is_prime_ex().

15 months agohammer2 - Performance work
Matthew Dillon [Fri, 12 Apr 2019 06:16:32 +0000 (23:16 -0700)]
hammer2 - Performance work

* Implement immediate (async) flush follow-through when OS requests
  it, with write-clustering support at the device level if enabled.
  Write-clustering support at the device level is disabled by default
  because H2 already uses a fairly large and efficient 64K block size.

* Change the XOP dispatch for strategy functions.  Further partition
  strategy functions by read or write to prevent reads from getting
  stuck behind long write chains.

  Also do not span-out I/O related to a single inode across too many
  XOP threads as doing so creates a massive amount of unnecessary
  lock contention.

* Significantly improves concurrent filesystem ops and I/O and
  significantly improves sequential filesystem write I/O.

15 months agohammer2 - Add debugging directive for calculating dirent crcs
Matthew Dillon [Fri, 12 Apr 2019 03:08:43 +0000 (20:08 -0700)]
hammer2 - Add debugging directive for calculating dirent crcs

* Add a debugging directive 'dhash' that can calculate the
  crc for extended directory entries (ones that overflow into
  a data block).

15 months agohammer2 - Correct allocator race and related corruption
Matthew Dillon [Fri, 12 Apr 2019 02:04:56 +0000 (19:04 -0700)]
hammer2 - Correct allocator race and related corruption

* When allocating fragments (below 16KB), for example 1K directory
  entries, 1K inodes, compressed file blocks that happen to be
  fragments, or end-of-file fragments, the allocator must ensure
  that any partially freed block is set back to fully allocated.

* In this specific case the allocator was not setting the
  correct bits in the freemap.  The situation never occurs
  on a block boundary (different code is executed which does
  the correct calculation), so the related block will always
  be in a minimally allocated state (either partially allocated
  or fully allocated).

  This means that the corruption can only happen under the specific
  circumstance where a fragment is allocated out of a block that
  the bulkfree code is simultaneously trying to free (marking it
  partially-allocated).  Because the wrong bits are set, the NEXT
  bulkfree pass can also miss the fact that the fragment is
  allocated and finish transitioning the block from partially-
  allocated to fully-free.

  A later allocation then corrupts the block, resulting in CHECK
  errors on the console.

* Because the bulkfree code always comes in and in ALL SITUATIONS OTHER
  THAN THIS SPECIFIC RACE will re-mark the blocks fully-allocated,
  the corruption can ONLY occur during heavy write activity during
  a bulkfree operation, typically when heavy manipulation of directory
  entries or inodes occurs.

* Correct the fragmentary bitmap calculation to set the proper
  bits.

15 months agolibc/rpc: Use sig_t (fixes -Wstrict-prototypes).
Sascha Wildner [Thu, 11 Apr 2019 19:25:18 +0000 (21:25 +0200)]
libc/rpc: Use sig_t (fixes -Wstrict-prototypes).

15 months agolibc/rpc: Fix some -Wstrict-prototypes warnings.
Sascha Wildner [Thu, 11 Apr 2019 18:03:33 +0000 (20:03 +0200)]
libc/rpc: Fix some -Wstrict-prototypes warnings.

15 months agolibc/db: Remove unnecessary casts too.
Sascha Wildner [Thu, 11 Apr 2019 11:03:08 +0000 (13:03 +0200)]
libc/db: Remove unnecessary casts too.

15 months agoftpd(8): Use libutil's pidfile(3) implementation.
Sascha Wildner [Thu, 11 Apr 2019 10:09:43 +0000 (12:09 +0200)]
ftpd(8): Use libutil's pidfile(3) implementation.

This unbreaks buildworld.

Reported-by: zrj
15 months agolibc/db: Fix -Wcast-function-type.
Sascha Wildner [Thu, 11 Apr 2019 09:25:42 +0000 (11:25 +0200)]
libc/db: Fix -Wcast-function-type.

15 months ago<string.h>: Remove legacy declaration of swab().
zrj [Wed, 10 Apr 2019 10:13:28 +0000 (13:13 +0300)]
<string.h>: Remove legacy declaration of swab().

It has prototype in <unistd.h> like in other BSDs and GNU implementations
as per OpenGroups XSI.

15 months agolibc/string: Add timing_safe functions from OpenBSD.
zrj [Tue, 9 Apr 2019 09:17:34 +0000 (12:17 +0300)]
libc/string: Add timing_safe functions from OpenBSD.

Good and small functions for crypto retlated things.
Add manpage and set __pure attributes.

Taken-from: OpenBSD

15 months agolibc/stdlib: Add recallocarray() function.
zrj [Tue, 9 Apr 2019 08:39:05 +0000 (11:39 +0300)]
libc/stdlib: Add recallocarray() function.

It is useful function for security related features, like resizing
memory objects containing sensitive data to avoid information leaking.
Update manpage.

Taken-from: OpenBSD

15 months agolibc/stdlib: Add freezero() function.
zrj [Tue, 9 Apr 2019 08:26:46 +0000 (11:26 +0300)]
libc/stdlib: Add freezero() function.

It is useful function for security related features. Internally uses
explicit_bzero(3) before freeing the pointers. It could be implemented
in nmalloc.c for extra benefits.
Update the manpage.

Taken-from: OpenBSD

15 months agolibc/string: Add explicit_bzero() from OpenBSD.
zrj [Tue, 9 Apr 2019 07:29:03 +0000 (10:29 +0300)]
libc/string: Add explicit_bzero() from OpenBSD.

It is useful function for security related features. It allows to
further manipulate discarded memory region through weak hook.
Update the bzero.3 manpage.

Taken-from: OpenBSD

15 months agolibc/tre: Fix -Wpointer-arith.
Sascha Wildner [Thu, 11 Apr 2019 06:37:39 +0000 (08:37 +0200)]
libc/tre: Fix -Wpointer-arith.

15 months agonscd(8): Remove local pidfile(3) implementation and use libutil's.
Sascha Wildner [Thu, 11 Apr 2019 07:21:07 +0000 (09:21 +0200)]
nscd(8): Remove local pidfile(3) implementation and use libutil's.

15 months agolibc/rpc: Fix some -Wmissing-prototypes.
Sascha Wildner [Wed, 10 Apr 2019 18:31:26 +0000 (20:31 +0200)]
libc/rpc: Fix some -Wmissing-prototypes.

15 months agolibc/locale: Fix -Wmissing-field-initializers.
Sascha Wildner [Wed, 10 Apr 2019 18:06:20 +0000 (20:06 +0200)]
libc/locale: Fix -Wmissing-field-initializers.

15 months agolibc: Remove an age old unused function.
Sascha Wildner [Wed, 10 Apr 2019 13:02:37 +0000 (15:02 +0200)]
libc: Remove an age old unused function.

It was labeled as "historic" even in 1994 and probably much earlier
before FreeBSD existed. Nothing in dports uses it and it was also
not added to Symbol.map so nothing could exist that uses it and is
dynamically linked against our libc.

In-discussion-with: zrj

15 months agolibc: Revert last commit partially. Make function public instead.
Sascha Wildner [Wed, 10 Apr 2019 08:58:00 +0000 (10:58 +0200)]
libc: Revert last commit partially. Make function public instead.

15 months agolibc/net: Align rthdr.c with <netinet6/in6.h> (#if 0 a function).
Sascha Wildner [Wed, 10 Apr 2019 08:48:46 +0000 (10:48 +0200)]
libc/net: Align rthdr.c with <netinet6/in6.h> (#if 0 a function).

Fixes a -Wmissing-prototype.

While here, fix typos in comments.

15 months agolibc: Fix some more -Wmissing-prototype.
Sascha Wildner [Tue, 9 Apr 2019 20:18:46 +0000 (22:18 +0200)]
libc: Fix some more -Wmissing-prototype.

15 months agolibc/glob: Fix a -Wstrict-prototypes warning by bringing back an old fix.
Sascha Wildner [Tue, 9 Apr 2019 18:51:24 +0000 (20:51 +0200)]
libc/glob: Fix a -Wstrict-prototypes warning by bringing back an old fix.

It went like this:

* In 2005, joerg fixed this warning in DragonFly (2a6aec8dab58c89961).

* In 2013, this fix was overwritten without looking with the then still
  broken version from FreeBSD (0d5acd7467c4e95f79).

* In 2015, joerg submitted the fix to FreeBSD and it was committed as
  r288098.

This commit applies back FreeBSD's r288098 to our tree. :)

15 months agoPRIV: Add global PRIVATELIB_CFLAGS.
zrj [Mon, 8 Apr 2019 22:21:33 +0000 (01:21 +0300)]
PRIV: Add global PRIVATELIB_CFLAGS.

In preparations for next updates.

15 months agosbin/hammer: Prefer to use installed private LibreSSL headers.
zrj [Mon, 8 Apr 2019 22:19:54 +0000 (01:19 +0300)]
sbin/hammer: Prefer to use installed private LibreSSL headers.

Requested-by: swildner
15 months agocrunchgen(1): Disable LTO for main() stubs.
zrj [Mon, 8 Apr 2019 19:11:31 +0000 (22:11 +0300)]
crunchgen(1): Disable LTO for main() stubs.

15 months agotcpdump(1): Match struct hnamemem types.
zrj [Mon, 8 Apr 2019 16:01:15 +0000 (19:01 +0300)]
tcpdump(1): Match struct hnamemem types.

They were different between print-atalk.c and addrtoname.c sources.

Caught-by: LTO
15 months agocrontab(1): Fix -flto warnings.
zrj [Mon, 8 Apr 2019 15:39:49 +0000 (18:39 +0300)]
crontab(1): Fix -flto warnings.

The crontab is compiled without -DLOGIN_CAP that in turn was excluding
a field in "struct _entry { ... } entry;" in cron.h header.
Make sure the struct size stays consistent.

Caught-by: LTO
15 months agocrontab(1): Constify few things.
zrj [Mon, 8 Apr 2019 15:33:30 +0000 (18:33 +0300)]
crontab(1): Constify few things.

15 months agosbin/hammer: Fix used include.
zrj [Mon, 8 Apr 2019 13:22:47 +0000 (16:22 +0300)]
sbin/hammer: Fix used include.

It should be <sha.h> for SHA256_Init() and rest.
For now the same as sbin/md5.

Caught-by: -flto
15 months agortquery(8): Fix MD5 prototypes.
zrj [Mon, 8 Apr 2019 11:16:07 +0000 (14:16 +0300)]
rtquery(8): Fix MD5 prototypes.

Do not use local MD5 prototypes.
The libcrypto is not needed, rtquery(8) is static.

Caught-by: LTO
15 months agorouted(8): Fix MD5 prototypes.
zrj [Mon, 8 Apr 2019 11:11:07 +0000 (14:11 +0300)]
routed(8): Fix MD5 prototypes.

Do not use local MD5 prototypes.
The libcrypto is not needed, routed(8) is static.

Caught-by: LTO
15 months agosys/boot/pc32: Fix -flto warnings in pxe.c
zrj [Mon, 8 Apr 2019 11:02:18 +0000 (14:02 +0300)]
sys/boot/pc32: Fix -flto warnings in pxe.c

Provide full structure. Avoids -flto warning:
note: code may be misoptimized unless -fno-strict-aliasing is used

15 months agolibstand: Adjust zlib hadling.
zrj [Mon, 8 Apr 2019 10:22:53 +0000 (13:22 +0300)]
libstand: Adjust zlib hadling.

Avoid crc32.c search issue in .PATH, move Makefile.stand inclusion
before sys/libkern. Add comments why.

15 months agolibstand/gzipfs: Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 09:45:24 +0000 (12:45 +0300)]
libstand/gzipfs: Minor trailing whitespace cleanup.

15 months agolib/libstand: Remove zipfs.c
zrj [Mon, 8 Apr 2019 09:39:03 +0000 (12:39 +0300)]
lib/libstand: Remove zipfs.c

It is unused duplicate of gzipfs.c
Adjust the libstand manpage.

15 months agotelnetd(8): Rename fatal function.
zrj [Mon, 8 Apr 2019 09:01:52 +0000 (12:01 +0300)]
telnetd(8): Rename fatal function.

Avoids symbol conflict with OpenSSH fatal().

15 months agolibkvm: Fix -flto warnings.
zrj [Mon, 8 Apr 2019 07:54:00 +0000 (10:54 +0300)]
libkvm: Fix -flto warnings.

Suggested-by: dillon
15 months agovmstat(8): Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 07:45:30 +0000 (10:45 +0300)]
vmstat(8): Minor trailing whitespace cleanup.

15 months agolibkvm: Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 07:41:31 +0000 (10:41 +0300)]
libkvm: Minor trailing whitespace cleanup.

15 months agolibc: Add prototypes for various functions we use in __weak_reference().
Sascha Wildner [Mon, 8 Apr 2019 17:14:52 +0000 (19:14 +0200)]
libc: Add prototypes for various functions we use in __weak_reference().

15 months agolibc/stdlib: Fix two -Wunused-parameter warnings.
Sascha Wildner [Mon, 8 Apr 2019 16:22:03 +0000 (18:22 +0200)]
libc/stdlib: Fix two -Wunused-parameter warnings.

15 months agofstat(1): Mangle dev2udev() name.
zrj [Sat, 6 Apr 2019 20:04:59 +0000 (23:04 +0300)]
fstat(1): Mangle dev2udev() name.

Avoid symbol conflicts with libkvm internal one.

15 months agofstat(1): Move out vm_map traversal functions to libkvm.
zrj [Sat, 6 Apr 2019 20:00:10 +0000 (23:00 +0300)]
fstat(1): Move out vm_map traversal functions to libkvm.

For ports benefit.

Suggested-by: dillon
15 months agolibkvm: Raise WARNS.
zrj [Sat, 6 Apr 2019 18:28:10 +0000 (21:28 +0300)]
libkvm: Raise WARNS.

15 months agolibkvm: Suppress last -Wsign-compare warnings.
zrj [Sat, 6 Apr 2019 18:26:48 +0000 (21:26 +0300)]
libkvm: Suppress last -Wsign-compare warnings.

15 months agolibkvm: Remove not needed casts in vsnprintf() calls.
zrj [Sat, 6 Apr 2019 17:56:47 +0000 (20:56 +0300)]
libkvm: Remove not needed casts in vsnprintf() calls.

Caught by -Wcast-qual.

15 months agolibkvm: Move kvm_notrans() to kvm.c
zrj [Sat, 6 Apr 2019 17:52:33 +0000 (20:52 +0300)]
libkvm: Move kvm_notrans() to kvm.c

Only used in kvm.c and avoids -Winline warnings.

15 months agolibkvm: Silence -Wtype-limits warning.
zrj [Sat, 6 Apr 2019 17:41:30 +0000 (20:41 +0300)]
libkvm: Silence -Wtype-limits warning.

The VM_MIN_USER_ADDRESS is currently defined as 0. Prevent "< 0" warning
by using intermediate variable.

15 months agolibkvm: Silence -Wmissing-field-initializers warnings.
zrj [Sat, 6 Apr 2019 17:21:24 +0000 (20:21 +0300)]
libkvm: Silence -Wmissing-field-initializers warnings.

Use designated initializers.

15 months agolibkvm: Fix -Wunused-parameter warnings.
zrj [Sat, 6 Apr 2019 17:11:12 +0000 (20:11 +0300)]
libkvm: Fix -Wunused-parameter warnings.

Remove unused arguments for local functions.
Add __unused attributes for public ones.

15 months agolibkvm: Fix -Wshadow warnings for gcc47.
zrj [Sat, 6 Apr 2019 17:10:01 +0000 (20:10 +0300)]
libkvm: Fix -Wshadow warnings for gcc47.

15 months agolibkvm: Fix -Wshadow warnings.
zrj [Sat, 6 Apr 2019 16:53:27 +0000 (19:53 +0300)]
libkvm: Fix -Wshadow warnings.

Move variable declarations to top.

15 months agolibkvm: Sort items in <kvm.h>
zrj [Sat, 6 Apr 2019 16:30:01 +0000 (19:30 +0300)]
libkvm: Sort items in <kvm.h>

15 months agolibkvm: Always use local kvm.h header.
zrj [Sat, 6 Apr 2019 16:26:10 +0000 (19:26 +0300)]
libkvm: Always use local kvm.h header.

15 months agolibkvm: Cleanup kvm_util.c
zrj [Sat, 6 Apr 2019 15:39:18 +0000 (18:39 +0300)]
libkvm: Cleanup kvm_util.c

Remove not needed includes and add <kvm.h> for missing prototype.

No functional change.

15 months agolibkvm: Add missing prototype for dev2udev().
zrj [Sat, 6 Apr 2019 15:35:50 +0000 (18:35 +0300)]
libkvm: Add missing prototype for dev2udev().

It is used by sys/kern/kern_kinfo.c (compiled as part of libkvm).
It would be good to mark this function as hidden.

15 months agolibkvm: Add include guards for kvm_private.h
zrj [Sat, 6 Apr 2019 15:34:19 +0000 (18:34 +0300)]
libkvm: Add include guards for kvm_private.h

15 months agoKernel: Minor whitespace cleanup in kern_kinfo.c.
zrj [Sat, 6 Apr 2019 15:30:41 +0000 (18:30 +0300)]
Kernel: Minor whitespace cleanup in kern_kinfo.c.

15 months agolibc/dmalloc: Adjust for aligned_alloc() changes.
zrj [Sat, 6 Apr 2019 10:49:13 +0000 (13:49 +0300)]
libc/dmalloc: Adjust for aligned_alloc() changes.

Follow up for d3a54aee8be483132cb76ecb195180d8c3cf9ed4.

15 months agolibc/dmalloc: Fix unused warning for non INVARIANTS.
zrj [Sat, 6 Apr 2019 10:14:49 +0000 (13:14 +0300)]
libc/dmalloc: Fix unused warning for non INVARIANTS.

15 months agolibc/stdlib: Refactor aligned_alloc().
zrj [Wed, 3 Apr 2019 13:26:44 +0000 (16:26 +0300)]
libc/stdlib: Refactor aligned_alloc().

  * Lift the restriction from posix_memalign() that alignment should be
    more or equal to sizeof(void *).
  * Make aligned_alloc() a weak symbol.
  * Adjust the manpage.

15 months agoAdd <alloca.h> header.
zrj [Mon, 1 Apr 2019 17:50:01 +0000 (20:50 +0300)]
Add <alloca.h> header.

There are quite a few ports that often assume <alloca.h> availability.
This addition should ease up porting efforts. It is reasonable to try
including different header than <stdlib.h> for alloca() definition:
 * alloca() is not implemented in libc (it is implemented by compiler);
 * <stdlib.h> will not provide alloca() macro for !__BSD_VISIBLE case;
 * including <stdlib.h> might bring in additional unwanted namespace
   pollution when implementing certain low-level features.

15 months agolibc/stdlib: Add __cxa_thread_atexit_impl() hook.
zrj [Mon, 1 Apr 2019 17:16:47 +0000 (20:16 +0300)]
libc/stdlib: Add __cxa_thread_atexit_impl() hook.

The __cxa_thread_atexit_impl() helper is needed for mainly c++ runtime
libraries to support destructors for thread local storage using LIFO.
The _thread_finalize() is implemented based on OpenBSD variant with few
exceptions: less restrictive destructors calling scheme and c++ runtime
preserves implementation details how it orders (or even uses) this libc
addition. Based on other BSDs and libsdc++/libc++ code this is least
intrusive method to have pthread_exit() hooks in libc runtime. By the
looks, in base system nothing was using libstdc++ internal version.

While there, enable __cxa_thread_atexit_impl() usage in gcc80 libstdc++.

15 months agolibc/stdlib: Avoid calling destructors in a wrong order.
zrj [Mon, 1 Apr 2019 11:20:40 +0000 (14:20 +0300)]
libc/stdlib: Avoid calling destructors in a wrong order.

There is a possibility that dso handle in __cxa_finalize() might be owned
by another dso. On exit(3) calling these destructors is pointless.

15 months agolibc: Fix some -Wunused-parameter warnings.
Sascha Wildner [Sun, 7 Apr 2019 18:42:57 +0000 (20:42 +0200)]
libc: Fix some -Wunused-parameter warnings.

15 months agolibc/libpthread: Add guard to fix redundant __isthreaded declarations.
Sascha Wildner [Sun, 7 Apr 2019 16:34:48 +0000 (18:34 +0200)]
libc/libpthread: Add guard to fix redundant __isthreaded declarations.

15 months agolibc/stdio: Remove two redundant prototypes.
Sascha Wildner [Sun, 7 Apr 2019 16:33:25 +0000 (18:33 +0200)]
libc/stdio: Remove two redundant prototypes.

15 months agolibc/net: Remove some unneeded externs.
Sascha Wildner [Sun, 7 Apr 2019 15:33:54 +0000 (17:33 +0200)]
libc/net: Remove some unneeded externs.

Prototypes are in netdb_private.h.

I had forgotten this in a1ff66cb7764cf805b759f2c7bfc51a8a11cf1aa.

Fixes some -Wredundant-decls warnings.

15 months agolibc/db: Add an include guard.
Sascha Wildner [Sun, 7 Apr 2019 15:46:06 +0000 (17:46 +0200)]
libc/db: Add an include guard.

joerg had added one back in 2005 in 871020e7804af32d9a544b48cd250fa4
but it was overwritten 8 years later in another sync with FreeBSD in
abd448c3b2d3508465e48d9cfdb163ef88fc242e.

This fixes a number of -Wredundant-decls which we'll hopefully enable
by default in the future.

15 months agolibmd: Remove sha384 traces.
Sascha Wildner [Sun, 7 Apr 2019 10:42:48 +0000 (12:42 +0200)]
libmd: Remove sha384 traces.

15 months ago<sys/ttydefaults.h>: Constify ttydefchars[], make size implicit and assert.
Sascha Wildner [Sun, 7 Apr 2019 09:54:49 +0000 (11:54 +0200)]
<sys/ttydefaults.h>: Constify ttydefchars[], make size implicit and assert.

While here, fix some whitespace too.

Mostly-taken-from: FreeBSD

15 months agostr{,case}cmp.3: Remove further bcmp(3) references.
Sascha Wildner [Sun, 7 Apr 2019 09:36:02 +0000 (11:36 +0200)]
str{,case}cmp.3: Remove further bcmp(3) references.

15 months ago<termios.h>: Cleanup #include, fix whitespace.
Sascha Wildner [Sun, 7 Apr 2019 09:05:57 +0000 (11:05 +0200)]
<termios.h>: Cleanup #include, fix whitespace.

15 months agomemcmp.3: Remove bcmp(3) reference.
Sascha Wildner [Sun, 7 Apr 2019 08:21:28 +0000 (10:21 +0200)]
memcmp.3: Remove bcmp(3) reference.

15 months agolibc: Merge bcmp.3 and memcmp.3.
Sascha Wildner [Sun, 7 Apr 2019 06:57:55 +0000 (08:57 +0200)]
libc: Merge bcmp.3 and memcmp.3.

This follows the merge in the code in 83d15e579c5b3b6ab775b345f1d68069.

15 months agoSync ACPICA with Intel's version 20190405.
Sascha Wildner [Sat, 6 Apr 2019 11:46:51 +0000 (13:46 +0200)]
Sync ACPICA with Intel's version 20190405.

* Fix some issues when resuming from suspend. Likely doesn't affect
  DragonFly.

* iasl(8): Support compiling multiple files to a single namespace.

For detailed list, please see sys/contrib/dev/acpica/changes.txt.

15 months agosys/vfs/fuse: Fix confusing vop_write_dirent() retval test
Tomohiro Kusumi [Fri, 5 Apr 2019 20:59:45 +0000 (05:59 +0900)]
sys/vfs/fuse: Fix confusing vop_write_dirent() retval test

vop_write_dirent() has confusing return value (bug).

When vop_write_dirent() returns non zero, *error is unchanged.
OTOH when vop_write_dirent() returns zero, *error may be non zero.

15 months agosys/vfs/autofs: Use VFS_STATFS()
Tomohiro Kusumi [Fri, 5 Apr 2019 20:52:35 +0000 (05:52 +0900)]
sys/vfs/autofs: Use VFS_STATFS()

15 months ago<unistd.h>: Update one more comment.
Sascha Wildner [Fri, 5 Apr 2019 22:16:29 +0000 (00:16 +0200)]
<unistd.h>: Update one more comment.

15 months ago<unistd.h>/<sys/unistd.h>: Update comments.
Sascha Wildner [Fri, 5 Apr 2019 22:08:40 +0000 (00:08 +0200)]
<unistd.h>/<sys/unistd.h>: Update comments.

15 months agosys/vfs/fuse: Mark /dev/autofs with D_MPSAFE
Tomohiro Kusumi [Fri, 5 Apr 2019 19:15:20 +0000 (04:15 +0900)]
sys/vfs/fuse: Mark /dev/autofs with D_MPSAFE

/dev/autofs was left without mpsafe flag.

15 months agosys/vfs/fuse: Add a comment
Tomohiro Kusumi [Thu, 4 Apr 2019 17:40:49 +0000 (02:40 +0900)]
sys/vfs/fuse: Add a comment

15 months agokernel - quiet repeated DA/CD probes for removable devices
Matthew Dillon [Fri, 5 Apr 2019 06:46:26 +0000 (23:46 -0700)]
kernel - quiet repeated DA/CD probes for removable devices

* Don't print errors when repeated probes for cards in sdcard
  readers fail, beyond the first instance.

* Fixes console spam when usb card readers are plugged in.

15 months agoRemove timezone typo via 'make upgrade'.
Sascha Wildner [Thu, 4 Apr 2019 06:22:47 +0000 (08:22 +0200)]
Remove timezone typo via 'make upgrade'.

15 months agosys/vfs/fuse: Drop PCATCH from tsleep on waiting IPC completion
Tomohiro Kusumi [Tue, 2 Apr 2019 15:30:11 +0000 (00:30 +0900)]
sys/vfs/fuse: Drop PCATCH from tsleep on waiting IPC completion

Even with kern_sigprocmask(SIG_BLOCK) called prior to tsleep(9),
tsleep with PCATCH flag can still catch a signal (e.g. SIGINT) and
return 0 (not EINTR).

This is due to tsleep(9) setting "lp->lwp_flags |= LWP_SINTR;" before
going into sleep when PCATCH is specified.

When this happens, KKASSERT() after tsleep(9) can be false, so just
drop PCATCH.