]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix use of OLD_FILES and OLD_LIBS for MK_BSNMP and MK_TESTS
Enji Cooper [Wed, 26 Nov 2014 14:01:27 +0000 (14:01 +0000)]
Fix use of OLD_FILES and OLD_LIBS for MK_BSNMP and MK_TESTS

Convention in the file is that .a files be added to OLD_FILES and versioned .so's
be added to OLD_LIBS

9 years agoIgnore LIBPRIVATEDIR when suggesting directories to prune
Enji Cooper [Wed, 26 Nov 2014 13:26:12 +0000 (13:26 +0000)]
Ignore LIBPRIVATEDIR when suggesting directories to prune

9 years agoAdd MK_TIMED option for optionally building usr.sbin/timed, et al
Enji Cooper [Wed, 26 Nov 2014 13:25:09 +0000 (13:25 +0000)]
Add MK_TIMED option for optionally building usr.sbin/timed, et al

9 years agoAccount for /usr/include/protocols/r{outed,whod}.h with their respective build knobs
Enji Cooper [Wed, 26 Nov 2014 12:54:58 +0000 (12:54 +0000)]
Account for /usr/include/protocols/r{outed,whod}.h with their respective build knobs

9 years agoFix some accidentally inverted logic
Enji Cooper [Wed, 26 Nov 2014 12:49:37 +0000 (12:49 +0000)]
Fix some accidentally inverted logic

9 years agoConditionalize a number of components in the tree
Enji Cooper [Wed, 26 Nov 2014 08:44:05 +0000 (08:44 +0000)]
Conditionalize a number of components in the tree

- bootparamd
- bootpd
- finger/fingerd
- ftp/ftpd
- hastctl/hastd
- iscsid, et al
- rbootd
- talk/talkd
- tcpd, et al
- tftp/tftpd

Add src.conf entries for the various components and do a best effort
at adding components to tools/build/mk/OptionalObsoleteFiles.inc

9 years agoDon't try and build 32-bit versions of hyperv / bhyve
Enji Cooper [Wed, 26 Nov 2014 06:54:17 +0000 (06:54 +0000)]
Don't try and build 32-bit versions of hyperv / bhyve

9 years agoMK_HYPERV:
Enji Cooper [Wed, 26 Nov 2014 03:38:12 +0000 (03:38 +0000)]
MK_HYPERV:
  Sort OLD_FILES and add /usr/libexec/hyperv to OLD_DIRS

9 years agoDon't install the rsh and telnetd pam.d files if MK_RCMDS == no
Enji Cooper [Wed, 26 Nov 2014 02:59:37 +0000 (02:59 +0000)]
Don't install the rsh and telnetd pam.d files if MK_RCMDS == no
or MK_TELNET == no, respectively

9 years agoOnly install the accounting/apm rc scripts for MK_ACCT/MK_APM if the relevant
Enji Cooper [Wed, 26 Nov 2014 02:46:48 +0000 (02:46 +0000)]
Only install the accounting/apm rc scripts for MK_ACCT/MK_APM if the relevant
knobs are set

9 years agoMissed the bsnmp config file
Enji Cooper [Wed, 26 Nov 2014 02:37:00 +0000 (02:37 +0000)]
Missed the bsnmp config file

9 years agoRemove deadcode
Enji Cooper [Wed, 26 Nov 2014 00:13:51 +0000 (00:13 +0000)]
Remove deadcode

9 years agoAdd script I'm using to add entries to OptionalObsoleteFiles.inc
Enji Cooper [Tue, 25 Nov 2014 23:01:01 +0000 (23:01 +0000)]
Add script I'm using to add entries to OptionalObsoleteFiles.inc

9 years agoAdd more MK_BSNMP == no entries for things not caught due to custom
Enji Cooper [Tue, 25 Nov 2014 22:38:16 +0000 (22:38 +0000)]
Add more MK_BSNMP == no entries for things not caught due to custom
settings in $SRCCONF

9 years agoDon't build/install lib/libvmmapi if MK_BHYVE == no
Enji Cooper [Tue, 25 Nov 2014 19:45:28 +0000 (19:45 +0000)]
Don't build/install lib/libvmmapi if MK_BHYVE == no

Suggested by: grehan

9 years agoFill in entries for MK_BSNMP == no
Enji Cooper [Tue, 25 Nov 2014 19:38:23 +0000 (19:38 +0000)]
Fill in entries for MK_BSNMP == no

9 years agoOnly install etc/rc.d/bsnmpd if MK_BSNMP == yes
Enji Cooper [Tue, 25 Nov 2014 19:37:55 +0000 (19:37 +0000)]
Only install etc/rc.d/bsnmpd if MK_BSNMP == yes

9 years agoMake building/installing bhyve optional via MK_BHYVE on amd64
Enji Cooper [Tue, 25 Nov 2014 19:20:25 +0000 (19:20 +0000)]
Make building/installing bhyve optional via MK_BHYVE on amd64

Disable building/installing bhyve from src.opts.mk on unsupported
architectures (!amd64)

9 years agoAdd an additional src.conf doc snippet for WITH_HYPERV
Enji Cooper [Tue, 25 Nov 2014 19:17:12 +0000 (19:17 +0000)]
Add an additional src.conf doc snippet for WITH_HYPERV

9 years agoMake src.opts.mk the source of truth for whether or not to build hyperv
Enji Cooper [Tue, 25 Nov 2014 19:01:49 +0000 (19:01 +0000)]
Make src.opts.mk the source of truth for whether or not to build hyperv

In particular, according to several Makefiles it can only be built/run on
amd64 and i386/i386. It isn't supported on i386/pc98

9 years agoMake inetd optional via MK_INETD
Enji Cooper [Tue, 25 Nov 2014 08:39:46 +0000 (08:39 +0000)]
Make inetd optional via MK_INETD

9 years agoDon't install othermta unless MK_MAIL == yes
Enji Cooper [Tue, 25 Nov 2014 08:04:32 +0000 (08:04 +0000)]
Don't install othermta unless MK_MAIL == yes

9 years agoMake bsdinstall(8) and sade(8) optional components via MK_BSDINSTALL=yes
Enji Cooper [Tue, 25 Nov 2014 07:30:26 +0000 (07:30 +0000)]
Make bsdinstall(8) and sade(8) optional components via MK_BSDINSTALL=yes

9 years agoThe shift; shift needs to be moved outside the .if ${MK_OPENSSL} conditional
Enji Cooper [Tue, 25 Nov 2014 07:14:16 +0000 (07:14 +0000)]
The shift; shift needs to be moved outside the .if ${MK_OPENSSL} conditional

9 years agoDon't create symlinks for nls/openssl unless the respective options are set
Enji Cooper [Tue, 25 Nov 2014 07:12:32 +0000 (07:12 +0000)]
Don't create symlinks for nls/openssl unless the respective options are set

9 years agoFor now, disable using -fsanitize=bounds for the libc ssp tests, when
Dimitry Andric [Mon, 24 Nov 2014 20:07:09 +0000 (20:07 +0000)]
For now, disable using -fsanitize=bounds for the libc ssp tests, when
using clang 3.5.0, until the runtime support (via compiler-rt) is added.
Otherwise, this would lead to link errors about missing support
libraries.

9 years agoAdd a bus_get_domain() wrapper around BUS_GET_DOMAIN(). Use this to add
John Baldwin [Mon, 24 Nov 2014 19:55:45 +0000 (19:55 +0000)]
Add a bus_get_domain() wrapper around BUS_GET_DOMAIN().  Use this to add
a new per-device '%domain' sysctl node that returns the NUMA domain a
device is associated with if it is associated with one.

Note that this API is still a WIP and might change before 11.0 actually
ships.

Differential Revision: https://reviews.freebsd.org/D930
Reviewed by: kib, adrian

9 years agoProperly initialize the capability rights for vnodes exported to procstat
John Baldwin [Mon, 24 Nov 2014 18:34:11 +0000 (18:34 +0000)]
Properly initialize the capability rights for vnodes exported to procstat
that aren't for file descriptors (cwd, jdir, tracevp, etc.).

Submitted by: Mikhail <mp@lenta.ru>

9 years agoAdd busdma sync ops before reading and after modifying the descriptor rings.
Ian Lepore [Mon, 24 Nov 2014 16:12:11 +0000 (16:12 +0000)]
Add busdma sync ops before reading and after modifying the descriptor rings.

This was previously working by accident because BUSDMA_COHERENT_MEMORY has
always been set to strongly-ordered on arm.  Now we're moving towards
normal-uncacheable (what might be called write-combining on other platforms)
and using the proper sync ops will be more important.  Of course, that
opens the question of just what is the "proper" sync op for shared
concurrent dma access as opposed to accesses where the handoff of control
of the memory has well-defined sequence points that match the available
busdma sync operations.

9 years agoAdd a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap
Philip Paeps [Mon, 24 Nov 2014 14:00:27 +0000 (14:00 +0000)]
Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap
should delete configured addresses and routes when the interface is
closed.  Default is enabled (preserve current behaviour).

MFC after: 1 week

9 years agoMake it possible to specify flags for autofs daemons in rc.conf.
Edward Tomasz Napierala [Mon, 24 Nov 2014 13:02:39 +0000 (13:02 +0000)]
Make it possible to specify flags for autofs daemons in rc.conf.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd ip_gre.h to ObsoleteFiles.inc.
Andrey V. Elsukov [Mon, 24 Nov 2014 12:53:56 +0000 (12:53 +0000)]
Add ip_gre.h to ObsoleteFiles.inc.

Sponsored by: Yandex LLC

9 years agoReplace home-grown CTL IO allocator with UMA.
Alexander Motin [Mon, 24 Nov 2014 11:37:27 +0000 (11:37 +0000)]
Replace home-grown CTL IO allocator with UMA.

Old allocator created significant lock congestion protecting its lists
of preallocated I/Os, while UMA provides much better SMP scalability.
The downside of UMA is lack of reliable preallocation, that could guarantee
successful allocation in non-sleepable environments.  But careful code
review shown, that only CAM target frontend really has that requirement.
Fix that making that frontend preallocate and statically bind CTL I/O for
every ATIO/INOT it preallocates any way.  That allows to avoid allocations
in hot I/O path.  Other frontends either may sleep in allocation context
or can properly handle allocation errors.

On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections
this change increases peak performance from ~700K to >1M IOPS!  Yay! :)

MFC after: 1 month
Sponsored by: iXsystems, Inc.

9 years agoLimit descriptors and enter capability mode.
Christian Brueffer [Mon, 24 Nov 2014 09:31:38 +0000 (09:31 +0000)]
Limit descriptors and enter capability mode.

Differential: D1009
Reviewed by: jonathan, pjd
MFC after: 2 weeks
Relnotes: yes

9 years agoRemove the pidfile clause from the ctl.conf example. Why do everyone
Edward Tomasz Napierala [Mon, 24 Nov 2014 08:13:44 +0000 (08:13 +0000)]
Remove the pidfile clause from the ctl.conf example.  Why do everyone
just copy/paste this line into their configs, it's beyond me.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix rendering of manpages with mandoc(1)
Baptiste Daroussin [Mon, 24 Nov 2014 08:13:21 +0000 (08:13 +0000)]
Fix rendering of manpages with mandoc(1)

9 years agoWe already have "int i" in this scope.
Gleb Smirnoff [Mon, 24 Nov 2014 07:57:20 +0000 (07:57 +0000)]
We already have "int i" in this scope.

Submitted by: alc

9 years agoThe arm PJ4B cpu is armv7 architecture, not v6.
Ian Lepore [Mon, 24 Nov 2014 01:13:58 +0000 (01:13 +0000)]
The arm PJ4B cpu is armv7 architecture, not v6.

If this feels like deja vu... the last time this was fixed in this file
only ARM_MMU_V6 was fixed, this time it's ARM_ARCH_V6 (and this time I
searched for other occurrances of pj4b in here).

9 years agoRead cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task.
Alexander Motin [Mon, 24 Nov 2014 00:59:51 +0000 (00:59 +0000)]
Read cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task.

This removes extra log noise on idle connection termination.

MFC after: 1 week

9 years agoFix rendering with mandoc
Baptiste Daroussin [Mon, 24 Nov 2014 00:34:49 +0000 (00:34 +0000)]
Fix rendering with mandoc

9 years agoAdd ARMV6 as an arm option. This will cause obscure magic in config(8)
Ian Lepore [Mon, 24 Nov 2014 00:02:15 +0000 (00:02 +0000)]
Add ARMV6 as an arm option.  This will cause obscure magic in config(8)
to automatically set the armv6 option when MACHINE_ARCH is armv6.  That
allows replacing ever-growing lists of cpu names as options to compile
a given file with the using either "optional armv6" or "optional !armv6".

9 years agoFix the negation (!) operator so that it binds only to the word that
Ian Lepore [Sun, 23 Nov 2014 23:58:47 +0000 (23:58 +0000)]
Fix the negation (!) operator so that it binds only to the word that
immediately follows it, which means 'not' has to be reset every time an
option word or device name is processed.

9 years agoFix rendering with mandoc
Baptiste Daroussin [Sun, 23 Nov 2014 23:56:01 +0000 (23:56 +0000)]
Fix rendering with mandoc

9 years agoFix rendering with mandoc
Baptiste Daroussin [Sun, 23 Nov 2014 23:55:04 +0000 (23:55 +0000)]
Fix rendering with mandoc

9 years agoTa is only allowed with Bl -column not in Bl -item
Baptiste Daroussin [Sun, 23 Nov 2014 23:35:16 +0000 (23:35 +0000)]
Ta is only allowed with Bl -column not in Bl -item

9 years agoWorkaround help2man defficiency that prevents mandoc from rendering
Baptiste Daroussin [Sun, 23 Nov 2014 23:17:18 +0000 (23:17 +0000)]
Workaround help2man defficiency that prevents mandoc from rendering

9 years agoChange the lower bound for guest vmspace allocation to 0 instead of
Peter Grehan [Sun, 23 Nov 2014 23:07:21 +0000 (23:07 +0000)]
Change the lower bound for guest vmspace allocation to 0 instead of
using the VM_MIN_ADDRESS constant.

HardenedBSD redefines VM_MIN_ADDRESS to be 64K, which results in
bhyve VM startup failing. Guest memory is always assumed to start
at 0 so use the absolute value instead.

Reported by: Shawn Webb, lattera at gmail com
Reviewed by: neel, grehan
Obtained from: Oliver Pinter via HardenedBSD
https://github.com/HardenedBSD/hardenedBSD/commit/23bd719ce1e3a8cc42fc8317b1c7c6d9e74dcba0
MFC after: 1 week

9 years agoInstall mdoc(7) and man(7) from mdoc instead of the one from groff
Baptiste Daroussin [Sun, 23 Nov 2014 22:28:46 +0000 (22:28 +0000)]
Install mdoc(7) and man(7) from mdoc instead of the one from groff

9 years agoRegenerate the manpage in mdoc(7) format using pod2mdoc
Baptiste Daroussin [Sun, 23 Nov 2014 22:16:43 +0000 (22:16 +0000)]
Regenerate the manpage in mdoc(7) format using pod2mdoc

Now mandoc can render the manpage properly

9 years agoCorrect the functions declaration.
Ruslan Bukin [Sun, 23 Nov 2014 22:09:05 +0000 (22:09 +0000)]
Correct the functions declaration.

9 years agoFix an error (case on a .Nm) preventing mandoc from rendering the manpage
Baptiste Daroussin [Sun, 23 Nov 2014 22:01:43 +0000 (22:01 +0000)]
Fix an error (case on a .Nm) preventing mandoc from rendering the manpage
Fix mandoc warnings: extrat space at end of lines

9 years agoSquelch a (bogus) used before init warning when building with gcc.
Ian Lepore [Sun, 23 Nov 2014 21:37:33 +0000 (21:37 +0000)]
Squelch a (bogus) used before init warning when building with gcc.

9 years agoMisc mdoc fixes:
Joel Dahl [Sun, 23 Nov 2014 21:00:00 +0000 (21:00 +0000)]
Misc mdoc fixes:

- Remove superfluous paragraph macros.
- Remove/fix empty or incorrect macros.
- Sort sections into conventional order.
- Terminate quoted strings properly.
- Remove EOL whitespace.

9 years agoConsider the negation operator (!) to be a word even if it is not followed
Ian Lepore [Sun, 23 Nov 2014 19:13:17 +0000 (19:13 +0000)]
Consider the negation operator (!) to be a word even if it is not followed
by whitespace.  This allows "optional !foo" which is what most programmers
are naturally going to tend to do as opposed to "optional ! foo".

9 years ago\n at end of panicstr is redundant.
Gleb Smirnoff [Sun, 23 Nov 2014 18:32:21 +0000 (18:32 +0000)]
\n at end of panicstr is redundant.

Submitted by: alc

9 years agoFix the following -Werror warning from clang 3.5.0, while building the
Dimitry Andric [Sun, 23 Nov 2014 18:31:55 +0000 (18:31 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by: adrian
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1212

9 years agoDon't use the synchronization endpoint unless referenced by the
Hans Petter Selasky [Sun, 23 Nov 2014 16:27:31 +0000 (16:27 +0000)]
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.

MFC after: 1 week

9 years agoMerge from projects/sendfile:
Gleb Smirnoff [Sun, 23 Nov 2014 12:01:52 +0000 (12:01 +0000)]
Merge from projects/sendfile:

o Provide a new VOP_GETPAGES_ASYNC(), which works like VOP_GETPAGES(), but
  doesn't sleep. It returns immediately, and will execute the I/O done handler
  function that must be supplied as argument.
o Provide VOP_GETPAGES_ASYNC() for the FFS, which uses vnode_pager.
o Extend pagertab to support pgo_getpages_async method, and implement this
  method for vnode_pager.

Reviewed by: kib
Tested by: pho
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoDo not include buf.h.
Gleb Smirnoff [Sun, 23 Nov 2014 10:26:28 +0000 (10:26 +0000)]
Do not include buf.h.

9 years agoifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct
Mateusz Guzik [Sun, 23 Nov 2014 08:25:44 +0000 (08:25 +0000)]
ifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct

Change racct_ create and destroy to macros evaluating to nothing without RACCT
so that their callers passing ui_racct don't have to be ifdefed.

9 years agobuf.h is not needed here, and pollutes when ufsmount.h is included
Gleb Smirnoff [Sun, 23 Nov 2014 01:02:19 +0000 (01:02 +0000)]
buf.h is not needed here, and pollutes when ufsmount.h is included
from userland code.

Sponsored by: Nginx, Inc.

9 years agoInclude required files directly instead of pollution via ufs/ufsmount.h.
Gleb Smirnoff [Sun, 23 Nov 2014 01:01:14 +0000 (01:01 +0000)]
Include required files directly instead of pollution via ufs/ufsmount.h.

Sponsored by: Nginx, Inc.

9 years agoFix comments
Baptiste Daroussin [Sun, 23 Nov 2014 00:30:32 +0000 (00:30 +0000)]
Fix comments

9 years agofiledesc: plug a test for impossible condition in fgetvp_rights
Mateusz Guzik [Sun, 23 Nov 2014 00:12:27 +0000 (00:12 +0000)]
filedesc: plug a test for impossible condition in fgetvp_rights

9 years agoFix typo
Baptiste Daroussin [Sun, 23 Nov 2014 00:08:43 +0000 (00:08 +0000)]
Fix typo

9 years agoChange man(1) to use mandoc to render manpages
Baptiste Daroussin [Sun, 23 Nov 2014 00:08:04 +0000 (00:08 +0000)]
Change man(1) to use mandoc to render manpages

man(1) now first test the manpage to run with mandoc to make sure it can be
rendered.
In case groff cannot be found (because base has been built WITHOUT_GROFF) it
recommands to install groff from the packages

9 years agoFix the following -Werror warnings from clang 3.5.0, while building
Dimitry Andric [Sat, 22 Nov 2014 23:50:18 +0000 (23:50 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.

MFC after: 3 days

9 years agosh: Prepend "$0: " to error messages if there is no command name.
Jilles Tjoelker [Sat, 22 Nov 2014 23:28:41 +0000 (23:28 +0000)]
sh: Prepend "$0: " to error messages if there is no command name.

9 years agoFix the following -Werror warnings from clang 3.5.0, while building
Dimitry Andric [Sat, 22 Nov 2014 23:04:33 +0000 (23:04 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by: hrs
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1197

9 years agoLower warnings to fix build with gcc
Baptiste Daroussin [Sat, 22 Nov 2014 22:13:00 +0000 (22:13 +0000)]
Lower warnings to fix build with gcc

9 years agoLower warning to allow building with gcc
Baptiste Daroussin [Sat, 22 Nov 2014 22:11:35 +0000 (22:11 +0000)]
Lower warning to allow building with gcc

9 years agoAdd the demandoc utility from the mandoc project
Baptiste Daroussin [Sat, 22 Nov 2014 21:11:17 +0000 (21:11 +0000)]
Add the demandoc utility from the mandoc project

This is a modern version of the deroff utility, useful for example to do
spellchecking on manpages

9 years agoDefine LIBSQLITE3 and LIBMANDOC
Baptiste Daroussin [Sat, 22 Nov 2014 21:03:05 +0000 (21:03 +0000)]
Define LIBSQLITE3 and LIBMANDOC

9 years agoAdd the preconv utility from mandoc project
Baptiste Daroussin [Sat, 22 Nov 2014 20:55:36 +0000 (20:55 +0000)]
Add the preconv utility from mandoc project

it recodes multibyte UNIX manual files into mandoc(1)

9 years agoRework mandoc Makefile to ease maintainance
Baptiste Daroussin [Sat, 22 Nov 2014 20:48:21 +0000 (20:48 +0000)]
Rework mandoc Makefile to ease maintainance
Add compat_reallocarray into libmandoc given other mandoc components will use
it.

9 years agoRework makefile in something closer to upstream Makefile to ease maintainance
Baptiste Daroussin [Sat, 22 Nov 2014 20:42:32 +0000 (20:42 +0000)]
Rework makefile in something closer to upstream Makefile to ease maintainance

9 years agoThere never was a PC Card joystick attachment that worked. Kill the
Warner Losh [Sat, 22 Nov 2014 20:31:20 +0000 (20:31 +0000)]
There never was a PC Card joystick attachment that worked. Kill the
current stub one until such time as one shows up.

9 years agoAdd missing bits svn merge did not catch
Baptiste Daroussin [Sat, 22 Nov 2014 20:18:38 +0000 (20:18 +0000)]
Add missing bits svn merge did not catch

9 years agoForgot to update libmandoc
Baptiste Daroussin [Sat, 22 Nov 2014 19:48:14 +0000 (19:48 +0000)]
Forgot to update libmandoc

9 years agoPromote SQLite3 as a privatelib as it will also be used by mandoc
Baptiste Daroussin [Sat, 22 Nov 2014 19:44:49 +0000 (19:44 +0000)]
Promote SQLite3 as a privatelib as it will also be used by mandoc

While here ensure sqlite3 is using pread(2) and enable the suppot for FTS4

9 years agoUpdate sqlite3 to 3.8.7.2
Baptiste Daroussin [Sat, 22 Nov 2014 19:18:08 +0000 (19:18 +0000)]
Update sqlite3 to 3.8.7.2

9 years agoAdd missing dependencies on pthread (sqlite being built with threadsafety on)
Baptiste Daroussin [Sat, 22 Nov 2014 19:17:05 +0000 (19:17 +0000)]
Add missing dependencies on pthread (sqlite being built with threadsafety on)

9 years agoImport sqlite3 3.8.7.2
Baptiste Daroussin [Sat, 22 Nov 2014 19:09:54 +0000 (19:09 +0000)]
Import sqlite3 3.8.7.2

9 years agoUpdate mandoc to 1.13.1
Baptiste Daroussin [Sat, 22 Nov 2014 18:57:23 +0000 (18:57 +0000)]
Update mandoc to 1.13.1

9 years agoRetire old, transition code for managing the FreeBSD 5 -> 6 migration.
Warner Losh [Sat, 22 Nov 2014 18:40:14 +0000 (18:40 +0000)]
Retire old, transition code for managing the FreeBSD 5 -> 6 migration.

9 years agoThe size value should be asserted when it is known.
Konstantin Belousov [Sat, 22 Nov 2014 18:15:02 +0000 (18:15 +0000)]
The size value should be asserted when it is known.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

9 years agoImport mandoc 1.13.1
Baptiste Daroussin [Sat, 22 Nov 2014 18:08:25 +0000 (18:08 +0000)]
Import mandoc 1.13.1

9 years agoBy the time that vm_reserv_init() runs, vm_phys_segs[] is initialized. Use
Alan Cox [Sat, 22 Nov 2014 17:46:30 +0000 (17:46 +0000)]
By the time that vm_reserv_init() runs, vm_phys_segs[] is initialized.  Use
it instead of phys_avail[].

Discussed with: Svatopluk Kraus

9 years agoFix the host mode ISOCHRONOUS transfer interval programming in the
Hans Petter Selasky [Sat, 22 Nov 2014 17:26:43 +0000 (17:26 +0000)]
Fix the host mode ISOCHRONOUS transfer interval programming in the
SAF1761 OTG driver. Currently the driver logic is very simple and
double buffering the USB transactions is not done.  Also you need to
use an external USB high speed USB HUB for reliable FULL speed
outgoing ISOCHRONOUS traffic, because the internal one chokes on
so-called split transfers above 188 bytes.

9 years agoImplement "automount -c".
Edward Tomasz Napierala [Sat, 22 Nov 2014 16:48:29 +0000 (16:48 +0000)]
Implement "automount -c".

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoCross-reference autounmountd(8) from umount(8).
Edward Tomasz Napierala [Sat, 22 Nov 2014 16:46:00 +0000 (16:46 +0000)]
Cross-reference autounmountd(8) from umount(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoCross-reference automount(8) from mount(8).
Edward Tomasz Napierala [Sat, 22 Nov 2014 16:43:36 +0000 (16:43 +0000)]
Cross-reference automount(8) from mount(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAvoid undefined behaviour in gas's rotate_left() macro for n == 0.
Dimitry Andric [Sat, 22 Nov 2014 16:30:31 +0000 (16:30 +0000)]
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from: joerg at netbsd
MFC after: 3 days

9 years agosh: Use DQSYNTAX only while expanding, not SQSYNTAX.
Jilles Tjoelker [Sat, 22 Nov 2014 16:03:18 +0000 (16:03 +0000)]
sh: Use DQSYNTAX only while expanding, not SQSYNTAX.

Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.

9 years agoFor both iSCSI initiator and target increase socket buffer sizes before
Alexander Motin [Sat, 22 Nov 2014 15:09:18 +0000 (15:09 +0000)]
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.

This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.

MFC after: 1 week

9 years agoFix build with asr driver
Steven Hartland [Sat, 22 Nov 2014 14:59:50 +0000 (14:59 +0000)]
Fix build with asr driver

This was broken by r274819 as asr is not in GENERIC because its not 64bit
safe.

MFC after: 1 month
X-MFC-With: r274819
Sponsored by: Multiplay

9 years agoAdd libm to eliminate "undefined reference to sqrt" on arm 'softfp' builds.
Ian Lepore [Sat, 22 Nov 2014 14:53:50 +0000 (14:53 +0000)]
Add libm to eliminate "undefined reference to sqrt" on arm 'softfp' builds.

9 years agoEnforce -lpthread and -lc to always be the 2 last components of the link list
Baptiste Daroussin [Sat, 22 Nov 2014 12:48:09 +0000 (12:48 +0000)]
Enforce -lpthread and -lc to always be the 2 last components of the link list

Differential Revision: https://reviews.freebsd.org/D1118
Suggested by: kib

9 years agoFix the following -Werror warnings from clang 3.5.0, while building
Dimitry Andric [Sat, 22 Nov 2014 12:13:05 +0000 (12:13 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by: ngie
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1196

9 years agoFix the following -Werror warning from clang 3.5.0, while building
Dimitry Andric [Sat, 22 Nov 2014 12:10:09 +0000 (12:10 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        if (abs(mtime - now) > (365/2)*86400)
            ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
        if (abs(mtime - now) > (365/2)*86400)
            ^~~
            labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1198